[Tutor] "idle" problem

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Wed Oct 29 11:56:01 EST 2003



On Mon, 27 Oct 2003, Partha Sur wrote:

> I am unable to use "idle" development environment for Python.
>
> When I invoke idle from the Linux prompt I get the following error
> message:

Hi Partha,

Sorry for the long delay in replying!  It looks like none of us have run
into this problem before, so I think that's why you're not getting good
answers from us.


> I added the following to my .profile
> PATH=$PATH:/usr/lib/python2.2/site-packages/idle:.
> to invoke idle directly from my home Linux prompt.

Are you sure you need to do this?  What happens if you execute IDLE using
an explicit absolute path?



> When I first invoked idle from my Linux prompt I got the following error
> message: "Import Error: No module named idlelib"
>
> So I then modified the idle script in the
> /usr/lib/python2.2/site-packages/idle

> # import modified by Partha Sur 9/22/2003
> # to suppress "ImportError : No module named idlelib"
> # import IdleConf and PyShell directly - there is no idlelib on this system
>
> import os
> import sys
> #from idlelib import IdleConf  <=  I commented this out
> import IdleConf

Yikes.  I'm not sure if this is valid to do.  If there's no idlelib on
your system, that's an indication that you have a broken version of IDLE
on your system.  Just modifying a file to make the ImportError go away is
probably not enough.

Let's see if a new version of IDLE will fix the problem.  Have you tried
using IDLEFork?

    http://sourceforge.net/project/showfiles.php?group_id=9579

It's the improved version of IDLE that Python 2.3 is using now.  I believe
it should work in 2.2, so you may want to see if it works for you.

Also, I'd recommend first seeing if it works by using the absolute
pathname.  Get it working first, and then you can concentrate on adding it
to your PATH.


Good luck to you!




More information about the Tutor mailing list