python installed but I can't find it

I have OpenSuse11.2 and I’m a bit of a Linux newbie. I know that Python is installed but I can’t find it. I’m using the KDE desktop, and I go to the Application launcher, Applications, and the first item should be Development or something like that, but my first item is Edutainment. Python is not in any of the other application groups. I have also gone into the KDE Menu editor and Development shows there. What do I need to do to make Development and Python show up in the Application Launcher?

Do this;

rpm -qa *python*

Basically the directory for python should be;
/usr/lib/python
or, depending on whether you have 64 BIT or 32 BIT.
/usr/lib64/python


You seem to think that python is a GUI program, it is not. Open a terminal and type

python

On 01/04/10 20:36, sfyanqui wrote:
>
> I have OpenSuse11.2 and I’m a bit of a Linux newbie. I know that Python
> is installed but I can’t find it. I’m using the KDE desktop, and I go
> to the Application launcher, Applications, and the first item should be
> Development or something like that, but my first item is Edutainment.
> Python is not in any of the other application groups. I have also gone
> into the KDE Menu editor and Development shows there. What do I need to
> do to make Development and Python show up in the Application Launcher?

Python doesn’t by default come with its own IDE or other GUI, it’s just
a script/command line interpreter, so if you run ‘python’ from within
an xterm/konsole you should see:
$python
Python 2.6 (r26:66714, Feb 3 2009, 20:52:03)
[GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>

If you don’t get to see the Python comand line, use ‘zypper in python’
to install.
There are some good IDEs for Python, like e.g. Eric4 (free) or WingIDE,
which comes in a free student “101” version or payed pro versions.

Theo

Okay, I was looking for the integrated development environment. I have seen it in other versions of Linux and thought it was part of the Suse group too. In Windows and Mac it’s called Idle. Is there something like that for Suse?

On 01/04/10 22:26, sfyanqui wrote:
>
> Okay, I was looking for the integrated development environment. I have
> seen it in other versions of Linux and thought it was part of the Suse
> group too. In Windows and Mac it’s called Idle. Is there something like
> that for Suse?
>
>

$idle

The program ‘idle’ can be found in following packages:

  • python-idle path: /usr/bin/idle, repository: zypp (repo-oss) ]
  • python3-idle path: /usr/bin/idle, repository: zypp (repo-oss) ]
  • python-idle path: /usr/bin/idle, repository: zypp (openSUSE-11.1-Updates) ]
  • python-idle path: /usr/bin/idle, repository: zypp (repo-update) ]

Try installing with: sudo zypper install python-idle

But Idle is hardly an IDE, it’s actually just a bare-bones debugging environment.
You can get the same functions if you add in your Python code, at the part where
you want to start debugging:

>>> import pdb; pdb.set_trace()
–Return–
> <stdin>(1)<module>()->None
(Pdb) h

Documented commands (type help <topic>):

EOF bt cont enable jump pp run unt
a c continue exit l q s until
alias cl d h list quit step up
args clear debug help n r tbreak w
b commands disable ignore next restart u whatis
break condition down j p return unalias where

Miscellaneous help topics:

exec pdb

Undocumented commands:

retval rv

(Pdb)

From there you can then inspect variables with ‘p var’, follow the flow with ‘n’
or ‘step’ to step into a funtion.

See http://aymanh.com/python-debugging-techniques for more tips.

HTH,
Theo

Okay, I guess until I get more familiar with both LInux and Python I’ll have to do my learning on one of the other platforms.

Thanks for the help.

Eric is a good IDE. It’s in the default repository. Just search through YaST, and you’ll find it.


On 01/04/10 23:26, sfyanqui wrote:
>
> Okay, I guess until I get more familiar with both LInux and Python I’ll
> have to do my learning on one of the other platforms.

Why?
Python isn’t any easier on another platform or using a fancy GUI tool, plus having a
Posix compliant platform makes a lot of things easier to deal with.
And using a less helpful/intrusive programming/debugging tool makes you think about
your code before you start typing, and maybe improves the quality of
what you produce afterwards.

Theo