read a line from socket (was: (no subject))

Lutz Horn lutz at lutz-horn.de
Mon Sep 16 07:25:30 EDT 2002


"Srijak Rijal" <wham10 at mad.scientist.com> writes:
> I just migrated from perl to python and was wondering if python
> socket can be read line by line too?  How can I get only one line of
> input from the server without losing info?

Split the string returned by recv() on the newline(s), save the
returned strings and use them at will.

Lutz




More information about the Python-list mailing list