def run(self):
    '\n        Run the eventloop for the telnet server.\n        '
    listen_socket = self.create_socket(self.host, self.port)
    logger.info('Listening for telnet connections on %s port %r', self.host, self.port)
    try:
        while True:
            self.connections = set([c for c in self.connections if (not c.closed)])
            connections = set([c for c in self.connections if (not c.handling_command)])
            read_list = ([listen_socket, self._schedule_pipe[0]] + [c.conn for c in connections])
            (read, _, _) = select.select(read_list, [], [])
            for s in read:
                if (s == listen_socket):
                    self._accept(listen_socket)
                elif (s == self._schedule_pipe[0]):
                    self._process_callbacks()
                else:
                    self._handle_incoming_data(s)
    finally:
        listen_socket.close()
Run the eventloop for the telnet server.
def run(self):
    '\n        \n        '
    listen_socket = self.create_socket(self.host, self.port)
    logger.info('Listening for telnet connections on %s port %r', self.host, self.port)
    try:
        while True:
            self.connections = set([c for c in self.connections if (not c.closed)])
            connections = set([c for c in self.connections if (not c.handling_command)])
            read_list = ([listen_socket, self._schedule_pipe[0]] + [c.conn for c in connections])
            (read, _, _) = select.select(read_list, [], [])
            for s in read:
                if (s == listen_socket):
                    self._accept(listen_socket)
                elif (s == self._schedule_pipe[0]):
                    self._process_callbacks()
                else:
                    self._handle_incoming_data(s)
    finally:
        listen_socket.close()