[Python-Dev] Accessing DLL objects from other DLLs

Michael Hearne mhearne808 at yahoo.com
Tue Apr 25 21:30:56 CEST 2006


Hi - I'm looking at implementing Python as a scripting language for an existing C++ code base.  However, there are many interdependencies between the C++ modules that I already have, and I'm not sure how to deal with this in a Python context.  I thought this would be the appropriate place to pose my question.  As background, I'm familiar with the basics of creating Python DLLs from scratch and using SWIG (my preferred approach).

For example:  Let's say I have a Foo class, which has it's own independent set of functionality, and so is worthy of making into it's own Python module.  Let us also say that I have a Bar class, which has some independent functionality and so could be made into it's own module, but has a method which can take an object of type Foo.

If I want to keep these classes as distinct modules, but retain this kind of module interdependency, how can I architect this with Python?  The current architecture has a sort of COM-like messaging middleman instantiated by "Main" that allows DLLs to call functionality in classes contained in other DLLs.

Thanks,

Mike




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20060425/3501e995/attachment.html 


More information about the Python-Dev mailing list