MCPcopy Create free account
hub / github.com/EasyIME/PIME / run

Method run

python/input_methods/chewing/config_tool.py:275–292  ·  view source on GitHub ↗
(self, tool_name)

Source from the content-addressed store, hash-verified

273 os.startfile(filename)
274
275 def run(self, tool_name):
276 # find a port number that's available
277 random.seed()
278 while True:
279 port = random.randint(1025, 65535)
280 try:
281 self.listen(port, "127.0.0.1")
282 break
283 except OSError: # it's possible that the port we want to use is already in use
284 continue
285 self.port = port
286
287 self.launch_browser(tool_name)
288
289 # setup the main event loop
290 loop = tornado.ioloop.IOLoop.current()
291 self.timeout_handler = loop.call_later(SERVER_TIMEOUT, self.quit)
292 loop.start()
293
294 def reset_timeout(self):
295 loop = tornado.ioloop.IOLoop.current()

Callers 5

mainFunction · 0.95
uFunction · 0.45
ftFunction · 0.45
tickFunction · 0.45
AnimationFunction · 0.45

Calls 5

launch_browserMethod · 0.95
currentMethod · 0.80
call_laterMethod · 0.80
listenMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected