'Connect to a host.
The optional second argument is the port number, which
defaults to the standard telnet port (23).
Don\'t try to reopen an already connected instance.'

def open(self, host, port=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):

    self.eof = 0
    if (not port):
        port = TELNET_PORT
    self.host = host
    self.port = port
    self.timeout = timeout
    self.sock = socket.create_connection((host, port), timeout)
