default=False, help=("Try harder to find the 'libpython*' shared library " "at the cost of a slower server startup.")) tornado.options.parse_command_line() from wdb_server.utils import refresh_process, LibPythonWatcher StyleHandler.theme = tornado.options.options.theme for l in (log, logging.getLogger('tornado.access'), logging.getLogger('tornado.application'), logging.getLogger('tornado.general')): l.setLevel(10 if tornado.options.options.debug else 30) if LibPythonWatcher: LibPythonWatcher( sys.base_prefix if tornado.options.options.extra_search_path else None) server = tornado.web.Application([(r"/", HomeHandler), (r"/style.css", StyleHandler), (r"/(\w+)/session/(.+)", MainHandler), (r"/debug/file/(.*)", DebugHandler), (r"/websocket/(.+)", WebSocketHandler), (r"/status", SyncWebSocketHandler)], debug=tornado.options.options.debug, static_path=static_path, template_path=os.path.join( os.path.dirname(__file__), "templates")) http = tornado.httpclient.AsyncHTTPClient() server.new_version = None
help="Port used to communicate with wdb instances") tornado.options.define("server_port", default=1984, help="Port used to serve debugging pages") tornado.options.parse_command_line() from wdb_server.utils import refresh_process, LibPythonWatcher StyleHandler.theme = tornado.options.options.theme for l in (log, logging.getLogger('tornado.access'), logging.getLogger('tornado.application'), logging.getLogger('tornado.general')): l.setLevel(10 if tornado.options.options.debug else 30) if LibPythonWatcher: LibPythonWatcher() server = tornado.web.Application( [ (r"/", IndexHandler), (r"/style.css", StyleHandler), (r"/debug/session/(.+)", MainHandler), (r"/debug/file/(.*)", DebugHandler), (r"/websocket/(.+)", WebSocketHandler), (r"/status", SyncWebSocketHandler) ], debug=tornado.options.options.debug, static_path=static_path, template_path=os.path.join(os.path.dirname(__file__), "templates") )