making my extensions work together

Chris Angelico rosuav at gmail.com
Thu Aug 4 03:08:59 EDT 2011


On Thu, Aug 4, 2011 at 2:19 AM, Mathew <myeates at jpl.nasa.gov> wrote:
> I have 2 extensions and they both access a function in a (static) library.
> The function maintains state information using a static variable.

If your extensions are DLLs and they're both linking to the same
static library, you should have two independent copies of that library
- which would mean they don't interfere with one another. That's why
the other extension doesn't see the change, and normally this is the
correct and desired behaviour.

Having the two be aware of each other is potentially very messy. As
Stefan suggested, making one depend on the other would be a lot
simpler. Alternatively, there may be ways to have the two extensions
share data through Python itself. What are you looking to accomplish?

ChrisA



More information about the Python-list mailing list