Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'library,': 0.05; 'subject:making': 0.07; 'python': 0.08; 'am,': 0.13; 'wrote:': 0.15; 'library': 0.15; 'dlls': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'simpler.': 0.16; 'suggested,': 0.16; 'variable.': 0.16; 'extensions': 0.16; 'static': 0.16; 'aug': 0.19; 'extension': 0.22; "doesn't": 0.22; 'header:In-Reply- To:1': 0.22; 'library.': 0.25; 'function': 0.26; 'thu,': 0.28; 'message-id:@mail.gmail.com': 0.28; 'correct': 0.29; 'stefan': 0.29; 'to:addr:python-list': 0.34; 'there': 0.34; 'normally': 0.34; 'another.': 0.35; 'maintains': 0.35; 'depend': 0.37; 'using': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'two': 0.38; 'should': 0.39; 'data': 0.39; 'itself.': 0.39; 'ways': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'your': 0.60; 'making': 0.66; 'share': 0.68 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+usDgdruB6MvJIfTH0CspGp6Pfw6Qh4jAy6qbAwykdY=; b=V7XVMmsFq9gl2MOjpuWxCIbqb2yaHpRdAsh969jmtozyzHx4gNX+UfvB37C4OndCfq Dy2wEZeqHBHc14gWRXy8RfD/bGDkfZf7+CUZVK0s7dhRM0AdOBADJ+O9aISlpB55JswE P27pExQ49nZLHq/NZqE0GouXakZPKnxa/+ZlQ= MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 4 Aug 2011 08:08:59 +0100 Subject: Re: making my extensions work together From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1312441742 news.xs4all.nl 23927 [2001:888:2000:d::a6]:56190 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10845 On Thu, Aug 4, 2011 at 2:19 AM, Mathew 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