socket.recv() question

Phil Mayes nospam at bitbucket.com
Sat Jan 29 03:52:11 EST 2000


Paul Schmidt wrote in message ...
>Hello all,
>      I am trying to parse data from an rwhois server, and it sends back
>lines terminated by \012.  whenever I do a:
>
>      results = sock.recv(1024)
>
>I only get the first line in results, but I want the entire output, so
>I can split it by lines and do other parsing things with the data.
>
>How would I go about doing this?


The server is presumably spitting out a line at a time.  Try
    sock.read()
or
    sock.readlines()
--
Phil Mayes    pmayes AT olivebr DOT com
Olive Branch Software - home of Arranger







More information about the Python-list mailing list