[Q] How to use IDLE in redhat

Young-Jin Lee ylee12 at uiuc.edu
Fri Jan 11 16:46:44 EST 2002


I tried just "idle" at my home directory, but to my dismay, it didn't work.
I got
Traceback (innermost last):
    File "/usr/lib/python2.2/Tools/idle/idle", line 5, in ?
        from idlelib import idlelib
ImportError: No module named idlelib

I also tried "idle.py" at my home directory again, but it didn't work
either.
I got
Traceback (innermost last):
    File "/usr/lib/python2.2/Tools/idle/idle/idle.py", line 3, in ?
        import PyShell
    File "/usr/lib/python2.2/Tools/idle/idle/PyShell.py", line 8, in ?
        import warnings
ImportError: No module named warnings

Moreover, the "/usr/lib/python2.x/Tools/idle" directory is on my path.

Thanks in advance.

"Cliff Wells" <logiplexsoftware at earthlink.net> wrote in message
news:mailman.1010693234.10084.python-list at python.org...
> On Thu, 10 Jan 2002 14:19:54 -0500
> Steve Holden wrote:
>
> > "Cliff Wells" <logiplexsoftware at earthlink.net> wrote in message
> > news:mailman.1010687836.15765.python-list at python.org...
> > > On Thu, 10 Jan 2002 11:53:18 -0600
> > > Young-Jin Lee wrote:
> > >
> > > > It worked, but it is still not what I wanted.
> > > > After building idle, I could use idle in the
> > > /usr/lib/python2.2/Tools/idle
> > > > directory. For example, when I tried "python2 idle.py" in my home
> > > directory,
> > > > I got "python2: can't open file 'idle.py'. I think I might modify
> > > > $PYTHONPATH shell variable. Could anybody tell me the way to do it?
> > > > Thanks in advance.
> > >
> > > That's because 'python2 idle.py' searches in the path for python2, but
> not
> > > for idle.py.
> > > Just type 'idle' at the prompt.
> > >
> > Under Unix you'll need to
> >
> >     a) Ensure the directory holding IDLE is on your path, and
> >     b) Use the command
> >
> >             idle.py
>
> He's already run setup.py (with build and install commands) from the idle
> directory so this won't be necessary.
>
> "python setup.py install" puts idle in /usr/bin.  Since python is in
> /usr/bin as well, if /usr/bin wasn't in his path, well...
>
> However, idle.py is /not/ put in /usr/bin, so typing "idle.py" won't work
> unless he explicitly sets his path to /usr/lib/python2.x/Tools/idle.
>
> --
> Cliff Wells
> Software Engineer
> Logiplex Corporation (www.logiplex.net)
> (503) 978-6726 x308
> (800) 735-0555 x308
>





More information about the Python-list mailing list