Embedding and extending

jidun at my-deja.com jidun at my-deja.com
Thu Feb 10 21:16:58 EST 2000


I know there are some threads discussing this,
but usually they concentrate on one or the other.
Also all of them refer to the online python.org
documentation which really isnt that good on
these two topics, imho.

Here is my understanding from those threads:
To do both I need three 'modules':

1: python
2: the module that extends python (.dll on Win32)
3: my application that embeds python (.exe on
Win32)

Is there a way to eliminate module 2? In other
words, can module 3 be both the app that embeds
python and the module that has the functions
python can call back to?

To elaborate: I know that a extend-module
called 'mymod' needs an initmymod function that
python calls when it imports it to get hold of
the function table. When I embed python in my
application, can I somehow hand over that
function table to python so that my scripts can
call back into my application?

Thanks
-Ron


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list