Hi Richard,

Make sure you understand the semantics of socket.send.  It does *not*
guarantee that it sends all the data, and the comment you have in your
program

> def sendLine(line, i):
>     s =  '\x02' + line[:-1] + '\x03'
>     logging.info('sending line ' + str(i))
>     print i
>     socktx.send(s)  # send the entire line to the socket
>     f2.write(s + '\n')
> #    time.sleep(0.2)
>     return

isn't actually true: depending on the conditions on the socket, it may
not send all the bytes in s.  See:
https://docs.python.org/2/library/socket.html#socket.socket.send for
more details.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to