Exec(code, updated_globals, frame.f_locals) except SystemExit: raise except: interpreter.showtraceback() else: pydevd_save_locals.save_locals(frame) return False #======================================================================================================================= # main #======================================================================================================================= if __name__ == '__main__': #Important: don't use this module directly as the __main__ module, rather, import itself as pydevconsole #so that we don't get multiple pydevconsole modules if it's executed directly (otherwise we'd have multiple #representations of its classes). #See: https://sw-brainwy.rhcloud.com/tracker/PyDev/446: #'Variables' and 'Expressions' views stopped working when debugging interactive console import pydevconsole sys.stdin = pydevconsole.BaseStdIn(sys.stdin) port, client_port = sys.argv[1:3] from _pydev_bundle import pydev_localhost if int(port) == 0 and int(client_port) == 0: (h, p) = pydev_localhost.get_socket_name() client_port = p pydevconsole.start_server(pydev_localhost.get_localhost(), int(port), int(client_port))
except SystemExit: raise except: interpreter.showtraceback() else: pydevd_save_locals.save_locals(frame) return False #======================================================================================================================= # main #======================================================================================================================= if __name__ == '__main__': #Important: don't use this module directly as the __main__ module, rather, import itself as pydevconsole #so that we don't get multiple pydevconsole modules if it's executed directly (otherwise we'd have multiple #representations of its classes). #See: https://sw-brainwy.rhcloud.com/tracker/PyDev/446: #'Variables' and 'Expressions' views stopped working when debugging interactive console import pydevconsole sys.stdin = pydevconsole.BaseStdIn(sys.stdin) port, client_port = sys.argv[1:3] from _pydev_bundle import pydev_localhost if int(port) == 0 and int(client_port) == 0: (h, p) = pydev_localhost.get_socket_name() client_port = p pydevconsole.start_server(pydev_localhost.get_localhost(), int(port), int(client_port))
sys.stdin = pydevconsole.BaseStdIn(sys.stdin) # parse command-line arguments optlist, _ = gnu_getopt(sys.argv, 'm:h:p', ['mode=', 'host=', 'port=']) mode = None host = None port = None for opt, arg in optlist: if opt in ('-m', '--mode'): mode = arg elif opt in ('-h', '--host'): host = arg elif opt in ('-p', '--port'): port = int(arg) if mode not in ('client', 'server'): sys.exit(-1) if mode == 'client': if not port: # port must be set for client sys.exit(-1) if not host: from _pydev_bundle import pydev_localhost host = client_host = pydev_localhost.get_localhost() pydevconsole.start_client(host, port) elif mode == 'server': pydevconsole.start_server(port)
def run(self): from _pydev_bundle import pydev_localhost pydevconsole.start_server(pydev_localhost.get_localhost(), self.server_port, self.client_port)
def run(self): from _pydev_bundle import pydev_localhost print('Starting server with:', pydev_localhost.get_localhost(), self.server_port, self.client_port) pydevconsole.start_server(pydev_localhost.get_localhost(), self.server_port, self.client_port)
def run(self): from _pydev_bundle import pydev_localhost pydevconsole.start_server(self.backend_port)
pydevd_save_locals.save_locals(frame) return False #======================================================================================================================= # main #======================================================================================================================= if __name__ == '__main__': #Important: don't use this module directly as the __main__ module, rather, import itself as pydevconsole #so that we don't get multiple pydevconsole modules if it's executed directly (otherwise we'd have multiple #representations of its classes). #See: https://sw-brainwy.rhcloud.com/tracker/PyDev/446: #'Variables' and 'Expressions' views stopped working when debugging interactive console import pydevconsole sys.stdin = pydevconsole.BaseStdIn(sys.stdin) port, client_port = sys.argv[1:3] from _pydev_bundle import pydev_localhost if int(port) == 0 and int(client_port) == 0: (h, p) = pydev_localhost.get_socket_name() client_port = p if len(sys.argv) > 4: host = sys.argv[3] client_host = sys.argv[4] else: host = client_host = pydev_localhost.get_localhost() pydevconsole.start_server(host, int(port), int(client_port), client_host)