giving imp.load_module not a real file, HOW?

Paul Sijben paul.sijben at
Fri Feb 1 09:13:53 CET 2008

I am running into a problem with the python interpreter's internals.

For some reason imp.load_module insists on getting a real open file as
the second parameter. I have not able to fool it with stringIO or
overloaded file objects.

So now I have two questions:
1) why does load_module insist on a real file
2) is there a way around it that does not involve (say) tempfile?


More information about the Python-list mailing list