MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / handle

Method handle

tools/python-3.11.9-amd64/Lib/idlelib/run.py:519–543  ·  view source on GitHub ↗

Override base method

(self)

Source from the content-addressed store, hash-verified

517class MyHandler(rpc.RPCHandler):
518
519 def handle(self):
520 """Override base method"""
521 executive = Executive(self)
522 self.register("exec", executive)
523 self.console = self.get_remote_proxy("console")
524 sys.stdin = StdInputFile(self.console, "stdin",
525 iomenu.encoding, iomenu.errors)
526 sys.stdout = StdOutputFile(self.console, "stdout",
527 iomenu.encoding, iomenu.errors)
528 sys.stderr = StdOutputFile(self.console, "stderr",
529 iomenu.encoding, "backslashreplace")
530
531 sys.displayhook = rpc.displayhook
532 # page help() text to shell.
533 import pydoc # import must be done here to capture i/o binding
534 pydoc.pager = pydoc.plainpager
535
536 # Keep a reference to stdin so that it won't try to exit IDLE if
537 # sys.stdin gets changed from within IDLE's shell. See issue17838.
538 self._keep_stdin = sys.stdin
539
540 install_recursionlimit_wrappers()
541
542 self.interp = self.get_remote_proxy("interp")
543 rpc.RPCHandler.getresponse(self, myseq=None, wait=0.05)
544
545 def exithook(self):
546 "override SocketIO method - wait for MainThread to shut us down"

Callers 1

Calls 7

ExecutiveClass · 0.85
StdInputFileClass · 0.85
StdOutputFileClass · 0.85
registerMethod · 0.45
get_remote_proxyMethod · 0.45
getresponseMethod · 0.45

Tested by

no test coverage detected