Reading text lines from a socket

Eddie Corns eddie at holyrood.ed.ac.uk
Mon Mar 1 10:53:06 EST 2004


Sandip Bhattacharya <sandip at linux-delhi.org> writes:


>However, I was looking for a python equivalent of the perl idiom of 
>opening a socket and getting a file handle ... and then reading this 
>file handle as any other line oriented file using $socket->readline

socket.makefile() does that.

Eddie



More information about the Python-list mailing list