Importer / module loader for filelike objects produces ugly stacktraces

Nebur goo at reifenberg.de
Mon Mar 9 11:56:37 EDT 2009


I've made an importer (experimental status) to load python modules
from archives, especially from AES encrypted ones.
( http://sourceforge.net/projects/py-archimporter )

I've followed the PEP 302 recipe (http://www.python.org/dev/peps/
pep-0302/).
The loader does set each modules __file__ attribute to a meaningful
string, similar to a real file name.

Still, any stacktrace of the application looks like that:
 (...)
  File "<string>", line 1530, in <module>
  File "<string>", line 225, in __init__
  File "<string>", line 423, in _
 (...)
Filenames are "<string>" all over.
Does someone know what am importer has to do for better tracebacks ?
Ruben



More information about the Python-list mailing list