dinamically created module

Paolo Invernizzi paoloinvernizzi at dmsware.com
Mon Apr 23 10:49:33 EDT 2001


I create at runtime a new module using the standard library "new" module,
and I populate it of classes at runtime.
What is the best way to save the result for using the module in another
program?
Actually I'm pickling all the content of the dinamic generated module, and
unpickling all in the second program, but I'm wondering if there is a better
way...
The best of all methods probably will be a way of generating python compiled
code, but how without having the source? Must use the disassembler module
and try to write a pyc? Must write the code object to the file? Where can
find some documentation?

Thank in advance

Paolo Invernizzi
paoloinvernizzi at dmsware.com





More information about the Python-list mailing list