(self, host, port=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT)
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.
Connect to a host.
Connect to a host .
def open(self, host, port=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
        """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.
        """
        self.eof = 0
        if not port:
            port = TELNET_PORT
        self.host = host
        self.port = port
        self.timeout = timeout
        sys.audit("telnetlib.Telnet.open", self, host, port)
        self.sock = socket.create_connection((host, port), timeout)
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 sys . audit ( "telnetlib.Telnet.open" , self , host , port ) self . sock = socket . create_connection ( ( host , port ) , timeout )