MCPcopy Index your code
hub / github.com/python/cpython / handle

Method handle

Lib/idlelib/run.py:530–554  ·  view source on GitHub ↗

Override base method

(self)

Source from the content-addressed store, hash-verified

528class MyHandler(rpc.RPCHandler):
529
530 def handle(self):
531 """Override base method"""
532 executive = Executive(self)
533 self.register("exec", executive)
534 self.console = self.get_remote_proxy("console")
535 sys.stdin = StdInputFile(self.console, "stdin",
536 iomenu.encoding, iomenu.errors)
537 sys.stdout = StdOutputFile(self.console, "stdout",
538 iomenu.encoding, iomenu.errors)
539 sys.stderr = StdOutputFile(self.console, "stderr",
540 iomenu.encoding, "backslashreplace")
541
542 sys.displayhook = rpc.displayhook
543 # page help() text to shell.
544 import pydoc # import must be done here to capture i/o binding
545 pydoc.pager = pydoc.plainpager
546
547 # Keep a reference to stdin so that it won't try to exit IDLE if
548 # sys.stdin gets changed from within IDLE's shell. See issue17838.
549 self._keep_stdin = sys.stdin
550
551 install_recursionlimit_wrappers()
552
553 self.interp = self.get_remote_proxy("interp")
554 rpc.RPCHandler.getresponse(self, myseq=None, wait=0.05)
555
556 def exithook(self):
557 "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