Module Help
Juan M. Casillas
juanm.casillas at eresmas.com
Thu Jun 27 10:06:59 EDT 2002
>>>>> "Thomas" == Thomas Guettler <zopestoller at thomas-guettler.de> writes:
Thomas> Juan M. Casillas wrote:
>> Hello!
>>
>> I want to create an empty module from C, and then add functions
>> and definitions stored in another file, and some code that I
>> will create on-the-fly, from C.
Thomas> I don't understand you. Want to you mean with "from C"?
Thomas> Why not use python for code generating?
Hello!
I have a C program that gets a file that gets some code
from various places; then I want to create different
execution environments, and the way I think I can do it
is creating various modules on the fly, and executing
code from them.
Kind Regards,
Juan M. Casillas
>> The basic problem I have is that I don't know how to create the
>> empty module (this module doesn't have any representation in
>> the filesystem) and then how can I add the code and save the
>> "environment" for this newly created module, how can I manage
>> the globals and locals dictionaries ? for each module ?
Thomas> Do you want to create a text file containing python code,
Thomas> or create it at runtime dynamically?
Thomas> thomas
Thomas> -- http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list