(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.
Write a string to the socket, doubling any IAC characters.
Write a string to the socket doubling any IAC characters .
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)
def write ( self , buffer ) : if IAC in buffer : buffer = buffer . replace ( IAC , IAC + IAC ) self . msg ( "send %r" , buffer ) self . sock . sendall ( buffer )