Reading text lines from a socket

Eddie Corns eddie at holyrood.ed.ac.uk
Mon Mar 1 16:53:06 CET 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