Select weirdness

Ron Garret rNOSPAMon at flownet.com
Sun Apr 22 12:36:57 EDT 2007


In article <590s1nF2ibkeqU1 at mid.individual.net>,
 Bjoern Schliessmann <usenet-mail-0306.20.chr0n0ss at spamgourmet.com> 
 wrote:

> > The only difference I can discern is that the browser send \r\n
> > for end-of-line while telnet just sends \n.  
...
> > But I don't see why that should make any difference.  
> 
> Easy. If you only accept "\r\n" as EOL, you'll wait forever unless
> you really receive it.

But it's SELECT that is hanging.  Select knows (or ought to know) 
nothing of end-of-line markers.  Readline (when it is called) is doing 
the Right Thing, and my end-of-request test is (currently) reading a 
line less than 3 characters long.  All that is working.  The problem is 
that select is saying there is no input (and therefore hanging) when in 
fact there is input.

rg



More information about the Python-list mailing list