I&#39;ve been doing some embedded python work and everything has been working like a charm thusfar! &nbsp;Twisted has saved us tons of work, hats off to the development team.<div><br></div><div><br></div><div>I have been having issues with shutting down twisted completely (I think). &nbsp;Even upon executing&nbsp;Py_Finalize or&nbsp;Py_EndInterpreter as necessary upon re-entering our browser plugin we hit an exception during twisted import.</div>
<div><br></div><div><br></div><div>Here is my traceback :</div><div><br></div><div><div>Traceback (most recent call last):</div><div>&nbsp;&nbsp;File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;</div><div>&nbsp;&nbsp;File &quot;ourCode.py&quot;, line 8, in &lt;module&gt;</div>
<div>&nbsp;&nbsp; &nbsp;from twisted.spread import pb</div><div>&nbsp;&nbsp;File &quot;C:\Python25\lib\site-packages\twisted\spread\pb.py&quot;, line 69, in &lt;module&gt;</div><div>&nbsp;&nbsp; &nbsp;from zope.interface import implements, Interface</div><div>&nbsp;&nbsp;File &quot;C:\Python25\lib\site-packages\zope\interface\__init__.py&quot;, line 58, in &lt;module&gt;</div>
<div>&nbsp;&nbsp; &nbsp;_wire()</div><div>&nbsp;&nbsp;File &quot;C:\Python25\lib\site-packages\zope\interface\interface.py&quot;, line 809, in _wire</div><div>&nbsp;&nbsp; &nbsp;classImplements(Attribute, IAttribute)</div><div>&nbsp;&nbsp;File &quot;C:\Python25\lib\site-packages\zope\interface\declarations.py&quot;, line 461, in classImplements</div>
<div>&nbsp;&nbsp; &nbsp;spec = implementedBy(cls)</div><div>&nbsp;&nbsp;File &quot;C:\Python25\lib\site-packages\zope\interface\declarations.py&quot;, line 332, in implementedByFallback</div><div>&nbsp;&nbsp; &nbsp;if isinstance(spec, Implements):</div><div>TypeError: &#39;NoneType&#39; object is not callable</div>
<div><br></div><div><br></div><div>Changing the order of imports hasn&#39;t seemed to matter, looks to me like something in zope init blows up if it&#39;s already loaded.</div><div><br></div><div>Is there a safe way to make sure the threads are dead? &nbsp;To clean imports out? &nbsp;Anything? &nbsp;I haven&#39;t been able to find much documentation to help me overcome the problem and I CANNOT forcibly unload our app from browser memory.</div>
<div><br></div><div>If the C++ code we are using for startup / shutdown let me know and I will post it as well.</div><div><br></div><div><br></div><div>Regards,</div><div><br></div><div>James</div><div><br></div></div>