Forced to Embed?

Lloyd NOlloydSP at fusion.net.nzAM
Tue Nov 1 01:00:04 EST 2005


Hi

After researching on Extending and Embedding it appears Extending is 
favoured greatly over Embedding. I've tested Boost::Python successfully 
in a test project but have run into an issue.

I have about 10 shared libraries that up until now have only been 
statically linked into an application and used from C++. I'd like to 
expose a lot of this functionality as different Python modules ( core, 
network, input, etc ), however the interdependency between the libraries 
seem to prohibit this. The library dependencies are in a tree heirarchy 
with the basic core library at the bottom.

As far as I can tell I have to export these all in one massive module as 
there is no way for the different python modules to directly communicate 
with each other?

Because of this I have to assume any application specific code would 
have to be placed in this massive module aswell and thus the whole 
module setup is moot and I might aswell embed python in the application 
and import the different interfaces as modules into the python namespace 
while still having them communicate directly because they're in the same 
executable.

I'd prefer to extend while using the normal python interpreter but I see 
no way around this without a large restructure?

Thanks for any suggestions...



More information about the Python-list mailing list