Add iterator to gzip files?

Fredrik Lundh fredrik at pythonware.com
Mon Feb 11 16:54:36 EST 2002


Russell E. Owen wrote:
> Similarly, I'm wondering if sockets will, or do, support iteration to
> read lines of data. (I've also wondered why they don't directly support
> read and write as unix sockets do

they sure do: it's just that the methods are spelled recv and send.

> one can create a file from a socket, but that seems a bit indirect.

the makefile method creates a *buffered* stream interface to the
raw socket.  if you're going to use readline, that's probably exactly
what you want.

</F>





More information about the Python-list mailing list