segfault with imp.load_module()

Rob Brown-Bayliss rob at
Sat Apr 5 11:22:51 CEST 2003

Hi, I can do this in interactive python:

>>> f,n,d = imp.find_module("oda",["./items/"])
>>> print f,n,d
<open file './items/', mode 'r' at 0x82c6db8> ./items/
('.py', 'r', 1)
>>> it = imp.load_module("oda",f,n,d)
>>> print it
<module 'oda' from './items/oda.pyc'>

but this code:
file, filename, description = imp.find_module(item, ["./items/"])
print file, filename, description
item_module = imp.load_module(item,file, filename, description)

gets this:

[rob at musicbox BHH-V]$ python
<open file './items/', mode 'r' at 0x81c2af8> ./items/
('.py', 'r', 1)
Segmentation fault


*  Rob Brown-Bayliss
*  =================	

More information about the Python-list mailing list