Newbie switching from TCL

Paul Duffin pduffin at hursley.ibm.com
Thu Aug 24 07:27:52 EDT 2000


Alex Martelli wrote:
> 
> "Robin Becker" <robin at jessikat.fsnet.co.uk> wrote in message
> news:WMCNkKAOfDp5EwGf at jessikat.fsnet.co.uk...
> > I use select only because it's in python for sockets. In win32 Tcl
> > I used the event model which relied on threading to do the notification.
> > I regard that as rather strange especially since as you so helpfully
> > point out there are dozens of ways to do it.
> 
> Tcl's architects may have chosen that architecture for portability
> reasons.  There may be a few ways to do general eventing on
> System V, a couple more to do it on BSD, a few more to do it
> in VMS, yet others for Win32, MacOS, BeOS, etc, etc -- but if
> you want to use a single architecture and do a decent job of
> covering them all, you're probably left with auxiliary thread[s]
> as maybe the only choice that stands a chance.
> 

I think the reason why Tcl's architects chose that approach was that they
simply do not know all of the Windows specific ways of doing things. They
are also UNIX people at heart so "select/poll" *IS* the only way to do
event driven I/O.

They started off with the mapping from select to WaitForMultipleObjects
and tried to make everything fit into that. By the sounds of it there
may be better ways to do this.

BTW. Does overlapping I/O work with sockets ?



More information about the Python-list mailing list