Re: why does socket.makefile require non-blocking mode?

2008-03-31 Thread Forest
Bryan Olson wrote: >Looking at the code for the existing _fileobject's read method, it >will loose data it has already read if a socket.recv() call raises >an exception. The function keeps buffers in a local variable that >will be lost if an exception exits the scope. That much could be >fixed wit

Re: why does socket.makefile require non-blocking mode?

2008-03-31 Thread Forest
On Sat, 29 Mar 2008 08:18:23 -0300, Guilherme Polo wrote: >I don't know why you think timeout is forbidden too, it is not. I can't tell for sure whether it is or isn't, because of this language in the socket module docs: "s.settimeout(0.0) is equivalent to s.setblocking(0); s.settimeout(None) is

why does socket.makefile require non-blocking mode?

2008-03-28 Thread Forest
ocket timeouts, so I ended up writing my own replacement for socket._fileobject. I'd appreciate it if someone could either explain to my why my new class was unnecessary, or else encourage me to contribute it as a patch to the socket module. Cheers, Forest -- http://mail.python.org/mailman/listinfo/python-list