def __init__(self, conn, addr, application, server, encoding):
    assert isinstance(addr, tuple)
    assert isinstance(application, TelnetApplication)
    assert isinstance(server, TelnetServer)
    assert isinstance(encoding, text_type)
    self.conn = conn
    self.addr = addr
    self.application = application
    self.closed = False
    self.handling_command = True
    self.server = server
    self.encoding = encoding
    self.callback = None
    self.size = Size(rows=40, columns=79)
    _initialize_telnet(conn)

    def get_size():
        return self.size
    self.stdout = _ConnectionStdout(conn, encoding=encoding)
    self.vt100_output = Vt100_Output(self.stdout, get_size, write_binary=False)
    self.eventloop = _TelnetEventLoopInterface(server)
    self.set_application(create_prompt_application())
    application.client_connected(self)
    self.handling_command = False
    self.cli._redraw()
def __init__(self, conn, addr, application, server, encoding):
    assert isinstance(addr, tuple)
    assert isinstance(application, TelnetApplication)
    assert isinstance(server, TelnetServer)
    assert isinstance(encoding, text_type)
    self.conn = conn
    self.addr = addr
    self.application = application
    self.closed = False
    self.handling_command = True
    self.server = server
    self.encoding = encoding
    self.callback = None
    self.size = Size(rows=40, columns=79)
    _initialize_telnet(conn)

    def get_size():
        return self.size
    self.stdout = _ConnectionStdout(conn, encoding=encoding)
    self.vt100_output = Vt100_Output(self.stdout, get_size, write_binary=False)
    self.eventloop = _TelnetEventLoopInterface(server)
    self.set_application(create_prompt_application())
    application.client_connected(self)
    self.handling_command = False
    self.cli._redraw()