herrnst/script.xbmc.lcdproc — pull request #12 by PetrovSE (2013-03-24 13:02:08+00:00)
Title: Use sendall instead send

Hi, it's me again!
I think it is better to use "sendall" instead of "send", because theoretically "send" can not fully transmit the commands.
Here is the code of the method "write" from library telnet:

def write(self, buffer):
"""Write a string to the socket, doubling any IAC characters.

Can block if the connection is blocked. May raise
socket.error if the connection is closed.

"""
if IAC in buffer:
buffer = buffer.replace(IAC, IAC+IAC)
self.msg("send %r", buffer)
self.sock.sendall(buffer)

They also use sendall.