Thanks Itamar, That was exactly the problem. The Twisted server/client example runs fine when the program is run directly (&gt; python.exe&nbsp; mycode.py) but not when imported at the python prompt. <br><br>Best,<br><br>Sajit 
<br><br><br><div class="gmail_quote">On Dec 8, 2007 8:27 PM, Itamar Shtull-Trauring &lt;<a href="mailto:itamar@itamarst.org">itamar@itamarst.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
1. Certain Python prompts (e.g. idle) may not work well with Twisted.<br>Better to run the program directly:<br><br>python.exe myscript.py<br><br>2. Might want to start a log:<br><br>from twisted.python import log<br>log.startLogging
(sys.stderr)<br><br>3. Might want to flush when writing to stdout().<br><br>At first glance, however, your code looks fine.<br><br></blockquote></div><br>