Forced to Embed?

Miki Tebeka mtebeka at qualcomm.com
Tue Nov 1 02:10:14 EST 2005


Hello Lloyd,

> 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?
What do you mean by "communicate"? Whey isn't "import" good enough?

 
> 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?
You can have one Python module that is the interface to the C++ module and
it will be structured the way you want (using classes, modules ...).

Bye.
--
------------------------------------------------------------------------
Miki Tebeka <mtebeka at qualcomm.com>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 215 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20051101/c7509820/attachment.sig>


More information about the Python-list mailing list