Devoloping socket applications with IDLE

Tim Lavoie tool_man at
Wed Aug 21 16:53:46 CEST 2002

In article <3D630F96.7020707 at>, the bean machine wrote:
> Hello,

> Anyone have any suggestions on how to develop socket apps when using the
> IDLE? I find an annoying problem when I am working on socket apps that I 
> can't break out of them. Well it is more complicated, I have multipled 
> threads running, and I can't figure out how to trap a signal (ctrl-c) 
> and exit both threads. I also get a problem that if I try to communicate 
> between two sockets and something goes wrong in the flow, the socket 
> will hang blocking waiting for input. It is kind of annoying problem and 
> I have to hangup the IDLE environment and restart it complete (kill id).
> Are there better ways to make socket programs that are responsive and 
> you can break from the keyboard?

Emacs.   :-)

Seriously, I don't know how to do it in idle, but I do use XEmacs. So, I can
interrupt the python sub-process no problem. My pet test program uses
asyncore though, so I don't know if it's the same for multi-threaded
apps. I do get the same behaviour as you describe in idle though with mine.

The other thing to mention to be fair though is that mine uses tkinter as
the main loop, so that might be awkward for idle anyway.

More information about the Python-list mailing list