Embedding Python questions
Mick Herres
mick at shockfusion.com
Wed Oct 9 15:40:13 EDT 2002
Hello,
Just had a question about modules while embedding Python in
C++. I've got a situation where I need to create multiple modules on
the fly to use as clean scripting environments. Once I am done with a
module, I need to be able to release it so that it could be later
re-created and would start out new and blank instead of be the
pre-existing module I had created earlier.
I don't seem to be able to release the old module so that it can be
re-initialized later under the same namespace. I am using the
Py_InitModule4() method so that I can keep a reference of the class that
was instansiated for mapping the C functions to C++ class methods.
Anyways, I'm thinking maybe it is the dictionary I need to be looking at
more closely, but I figured I would ask the folk that have been doing
this MUCH longer than I have before I go and re-invent the wheel :-).
Thanks in advance!
mick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20021009/dfce9947/attachment.html>
More information about the Python-list
mailing list