[Idle-dev] Python Core Dump

Kurt B. Kaiser kbk at shore.net
Mon Nov 21 21:14:01 CET 2005


Fuzzyman <fuzzyman at voidspace.org.uk> writes:

>>If I try this with 2.4.2 on W2K, I get an error dialog which says, "No
>>source for module operator".  There is no operator.py on my path.
>>
>>  
>>
>
> Mine neither - ``operator.pyd``

There's a builtin module 'operator' in standard CPython, but no operator.pyd.
It must have come with one of your non-standard implementations.

Try this:

Linux, Python 2.5a0:

>>> import imp
>>> imp.find_module('operator')
(<open file '/home/kbk/PYDOTORG/projects/python/trunk/build/lib.linux-i686-2.5/operator.so', mode 'rb' at 0xb7cfaad0>, '/home/kbk/PYDOTORG/projects/python/trunk/build/lib.linux-i686-2.5/operator.so', ('.so', 'rb', 3))

[Module is '3':  C_EXTENSION]


Windows 2K, Python 2.4.1:

>>> imp.find_module('operator')
(None, 'operator', ('', '', 6))

[Module is '6':  C_BUILTIN]

What do you get?

> This could be an oddity of my windoze setup I suppose, but it's a fairly
> normal - XP SP2 running Activepython 2.4.2
>
> It happens consistently, including on another machine running a Movable
> Python distribution frozen from the original machine. (It's also XP
> SP2).  (The Movable Python machine is the one I'm using now.)
>
>>What happens when you try <import operator> using the Python
>>interactive interpreter?
>>
>>  
>>
>>From the Movable Python machine I'm on now :
>
>>>> import operator
>>>> operator
> <module 'operator' (built-in)>
>>>>
>
> Is it still worth me filing this as a bug report ?

So far, I suspect the problem is in your setup, i.e.  the non-standard
Python module operator.pyd, rather than IDLE.

The operator module should not be type '1'.

But if you do get '3' or '6' for the module type, as I did, then try
instrumenting EditorWindow._find_module() and
EditorWindow.open_module() with print statements to locate your
'crash'. It may be that imp.load_module() is failing, try running it
manually.

I think it's fair to say that while it's ok to have several versions
of python on your machine, they should be in separate directory trees.
So if you are running CPython from python.org, there shouldn't be any
operator.pyd from ActiveState or wherever in your CPython tree.

If you are running ActiveState Python, I'm not going to be much help,
I'm afraid.  But if you can narrow it down to something in IDLE, I'll
try to fix it.

-- 
KBK


More information about the IDLE-dev mailing list