def GET(host, port, string):
s = socket(AF_INET, SOCK_STREAM)
s.connect(host, port)
s.send(string + '\n')
totalbuf=''
while 1:
buf = s.recv(1024)
len(buf)
totalbuf=totalbuf+buf
if not buf: break
b=sys.stdout.write(buf)
len(b)
sys.stdout.flush()
return totalbuf
I've tried a thousand permutations, but it seems that s.recv(1024) is not
returning a string during the while loop (is it an fd?). I want to store
the results to process later, rather than write to stdout.
Thanks for any help.
Paul Everitt V 703.785.7384 Email Paul.Everitt@cminds.com
Connecting Minds, Inc. F 703.785.7385 WWW http://www.cminds.com/