Embeding Python & Dynamic Callbacks

Paul Tate paulypoos at hotmail.com
Wed Sep 26 06:49:42 EDT 2001


Hello All,

I'm evaluating Python as an embedded language in our application
(Win32).  I've done the basics (thanks to the great documentation)
however...

I'm passing the method table in through Py_InitModule, and this works
great.  The complication is that our application loads some of its
functionality dynamically (at run time, from a .dll).  These functions
are loaded from the dlls before the call to Py_InitModule, and need to
be exposed in Python.

I can dynamically create the method table, but I cannot dynamically
create a C callback function.  If I use the same callback for each
dynamically loaded function, I do not know how to find out which token
caused the callback to be called.

Any ideas?

Paul



More information about the Python-list mailing list