[Python-3000] iostack and sock2

tomer filiba tomerfiliba at gmail.com
Tue Jun 6 19:43:15 CEST 2006

WaitForMultipleObjects doesnt work on sockets of files...

On 6/6/06, Giovanni Bajo <rasky at develer.com> wrote:
> tomer filiba <tomerfiliba at gmail.com> wrote:
> >> One thing I would like to raise is the issue of KeyboardInterrupt. I
> >> find very inconvenient that a normal application doing a very simple
> >> blocking read from a socket can't be interrupted by a CTRL+C
> >> sequence. Usually, what I do is to setup a timeout on the sockets
> >> (eg. 0.4 seconds) and then simply retry if the data has not arrived
> >> yet. But this changes the code from:
> >
> > from my experience with linux and solaris, this CTRL+C problem only
> > happens on windows machines. but then again, windows can't select()
> > on anything but sockets, so there's not gonna be a generic solution.
> Windows has WaitForMultipleObjects() which can be used to multiplex between
> sockets and other handles.
> Giovanni Bajo

More information about the Python-3000 mailing list