Import a module from a non-file?

Petri Savolainen petri.savolainen at iki.fi
Fri Oct 17 11:06:57 EDT 2003


I was trying to roll my own python code importer, but in the end, it seems
that no matter what you try, it is always necessary to supply a REAL file
object for python lower-level import machinery to work. Is this really
true? Or did I miss something?

Of course, it is easy to get the module source from somewhere, put it into a
tmpfile etc. ... but I'd be nice to be able to skip that extra step.

Thanks,

 Petri 




More information about the Python-list mailing list