Preinitialized objects when embedding?

Joakim Ziegler joakim at login1.styx.net
Wed Feb 23 02:08:43 EST 2000


Thanks to some excellent help I got here a month or two ago, my Python
bindings for Flux (URL: http://projects.simplemente.net/flux/ ) are coming
along quite nicely. However, the next step will be to embed Python in C
applications that use Flux, so that they can execute scripts.

Now, at the moment the scripts are going to be run, these applications
already have finished data structures of the types I've been making Python
bindings for. However, I can't seem to figure out how to get the initial data
structures bound to a Python object so that the script can operate on them. I
imagine this is a common situation, what's the best way of doing this? Is
there some way of initializing the interpreter so that certain objects exist
in the namespace from the start, bound to data structures in the embedding
application, using object definitions written in C that are in a Python
module (.so) separate from the application?

-- 
Joakim Ziegler - simplemente r&d director - joakim at simplemente.net
 FIX sysop - free software coder - FIDEL & Conglomerate developer
      http://www.avmaria.com/ - http://www.simplemente.net/



More information about the Python-list mailing list