<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I have the exact same problem.&nbsp; I am using the standard unittest, not
the one found in Twisted, for the moment anyway.<br>
<br>
All my tests work perfectly while using Twisted 1.3, calling
reactor.crash() vs reactor.stop().&nbsp; I originally had problems calling
reactor. stop() with the python unittest framework, until I switched
over to reactor.crash().&nbsp; <br>
<br>
I then wanted to run the tests using Twisted 2.0.&nbsp; The python process
that starts the unittest will hang after all tests are done.&nbsp;&nbsp; I can't
kill the process using a CTRL-C at the command line and must use the
kill -9 command.<br>
<br>
Also, I noticed that the main part of the program does execute the last
print statement found at:<br>
<br>
<tt>if __name__ == "__main__":<br>
&nbsp;&nbsp;&nbsp; run()<br>
&nbsp;&nbsp;&nbsp; print( "This will print and then hang" )<br>
</tt><br>
<br>
The following is a bug that had similar behavior, which <b>*may*</b>
explain the source of the issue:<br>
<br>
<a class="moz-txt-link-freetext"
 href="http://twistedmatrix.com/bugs/issue994">http://twistedmatrix.com/bugs/issue994</a><br>
<br>
I am using python 2.3.4 on SUSE 9.2,&nbsp; and also new to Twisted...<br>
<br>
James.<br>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:glyph@divmod.com">glyph@divmod.com</a> wrote:
<blockquote
 cite="mid20050430160122.15422.1513488416.divmod.quotient.10014@ohm"
 type="cite"><br>
  <br>
On Sat, 30 Apr 2005 11:16:19 -0400, T Barket
<a class="moz-txt-link-rfc2396E" href="mailto:thomas_barket@yahoo.com">&lt;thomas_barket@yahoo.com&gt;</a> wrote:
  <br>
  <blockquote type="cite">Hello,
    <br>
  </blockquote>
  <br>
  <blockquote type="cite">i have read i cannot stop and restart a
reactor (which is what i would like
    <br>
to do on the client side).
    <br>
  </blockquote>
  <br>
It sounds like you may have found a bug (I'll look into it) but...
  <br>
  <br>
If you want to use the reactor interactively, look into the various
incarnations of Manhole.&nbsp; Stopping the reactor and starting it again
has lots of ugly side-effects which are hard to explain until you've
had a lot of experience working with the reactor the "right" way.
  <br>
  <br>
(If you absolutely need it, of course, it should work, and we'll fix it
- but it's extremely rare that people actually need it, and pretty
common that people *think* they need it.)
  <br>
  <br>
_______________________________________________
  <br>
Twisted-Python mailing list
  <br>
<a class="moz-txt-link-abbreviated" href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a>
  <br>
<a class="moz-txt-link-freetext" href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a>
  <br>
</blockquote>
<br>
</body>
</html>