Newbie switching from TCL

Cary O'Brien cobrien at Radix.Net
Thu Aug 24 17:25:37 EDT 2000


In article <39A506B8.C32B8857 at hursley.ibm.com>,
Paul Duffin  <pduffin at hursley.ibm.com> wrote:
>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 ?

A bit of history:

Originally, TCL didn't have sockets or an event loop.  TK
forced the event loop, and the sockets came in from TCLX.

-- cary





More information about the Python-list mailing list