Add iterator to gzip files?

Fredrik Lundh fredrik at
Mon Feb 11 22:54:36 CET 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.


More information about the Python-list mailing list