socket.recvfrom() & sendto()

Fredrik Lundh fredrik at
Thu May 10 03:30:02 EDT 2001

Donn Cave wrote:
> | No, you're not.  Win32 has numerous blatant design problems,
> | and that's one of them.
> I'm a big fan of the device abstraction as supported by UNIX, that
> makes select() work the same on a tty or socket or pipe.  Always
> nice, but sadly rare, to see that come along with Berkeley sockets
> on a non-UNIX platform.
> But in the present case, is this really a serious complaint?  I don't
> know Windows all that well, so it's not clear to me, are we talking
> about some tty-like device that serves a DOS window, or would you
> want to select() on keyboard+mouse and get any event that belongs
> to your graphic application?

fwiw, Windows has extensive support for select-style synchronization
using all sorts of event sources (files, serial channels, console devices,
timers, jobs/processes/threads, custom event objects, etc).  it's just
that they use object handles for everything, not small positive integers...

(you can bind a socket to an event object, and treat it like any other
event source, but Python's socket layer doesn't support that)

Cheers /F

More information about the Python-list mailing list