[Twisted-Python] Newbie Problem

Jean-Paul Calderone exarkun at divmod.com
Wed Sep 13 09:09:30 EDT 2006

On Tue, 12 Sep 2006 21:11:30 -0700 (PDT), Damon Kohler <damonkohler at yahoo.com> wrote:
>This is probably something simple. I'm having some trouble with this little bit
>of code below. I start it up once as a server, then a second time as the client
>connecting to localhost. However, it never actually seems to connect. Both
>sides just wait indefinitely. I'm a bit stuck as to how to debug this, so if
>someone has a solution for me and could tell me how I would have figured it
>out, that would be great!

Most likely the problem is sys.stdin.readline().  I suggest taking a look
at twisted.internet.stdio as a way to eliminate your ConsoleInput class
and the uses of the reactor-private method addReader().

If I were going to try to track down the cause of the hang, I'd probably
start with strace to see where the processes are waiting.


More information about the Twisted-Python mailing list