[Tutor] "idle" problem

Partha Sur p.sur at worldnet.att.net
Mon Oct 27 21:12:44 EST 2003


Hello,

I am unable to use "idle" development environment for Python.

When I invoke idle from the Linux prompt I get the following error message:

Memory fault.

I get back the Linux prompt.
(I am using ksh)

My hardware / software configuration is as follows:

Hardware:  Dell Dimension XPS T500
OS:  Red Hat Linux 9  (Kernel 2.4.20-6)
python-2.2.2-26
tkinter-2.2.22-26
tcl-8.3.5-88
tk-8.3.5-88
tclx-8.3-88
tcllib-1.3-88

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.

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
directory thus:

#! /usr/bin/env python

# 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

idle_dir = os.path.dirname(IdleConf.__file__)
IdleConf.load(idle_dir)
# defer importing Pyshell until IdleConf is loaded
#from idlelib import PyShell   <=  I commented this out
import PysShell
PyShell.main()

Now I do not get the "ImportError: ..." error message but idle fails to run
with the "Memory fault" error message.

If anyone can help me resolve my problem I shall be very thankful.
Until then I am forced to work with the >>> prompt.

Thanks.

Partha Sur





More information about the Tutor mailing list