def __init__(self, args=None):
        """
        :param args: Argument parser args. If None, the server will setup and
            use its own argument parser (using
            :meth:`pyqode.core.backend.default_parser`)
        """
        self.reset_heartbeat()
        if not args:
            args = default_parser().parse_args()
        self.port = args.port
        self.timeout = HEARTBEAT_DELAY
        self._Handler.srv = self
        socketserver.TCPServer.__init__(
            self, ('127.0.0.1', int(args.port)), self._Handler)
        print('started on 127.0.0.1:%d' % int(args.port))
        print('running with python %d.%d.%d' % (sys.version_info[:3]))
        self._heartbeat_thread = threading.Thread(target=self.heartbeat)
        self._heartbeat_thread.setDaemon(True)
        self._heartbeat_thread.start()
def __init__ ( self , args = None ) : self . reset_heartbeat ( ) if not args : args = default_parser ( ) . parse_args ( ) self . port = args . port self . timeout = HEARTBEAT_DELAY self . _Handler . srv = self socketserver . TCPServer . __init__ ( self , ( '127.0.0.1' , int ( args . port ) ) , self . _Handler ) print ( 'started on 127.0.0.1:%d' % int ( args . port ) ) print ( 'running with python %d.%d.%d' % ( sys . version_info [ : 3 ] ) ) self . _heartbeat_thread = threading . Thread ( target = self . heartbeat ) self . _heartbeat_thread . setDaemon ( True ) self . _heartbeat_thread . start ( )
:param args: Argument parser args. If None, the server will setup and
            use its own argument parser (using
            :meth:`pyqode.core.backend.default_parser`)