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

Method run_hooks

Lib/_pyrepl/reader.py:690–706  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

688 self.finish()
689
690 def run_hooks(self) -> None:
691 threading_hook = self.threading_hook
692 if threading_hook is None and 'threading' in sys.modules:
693 from ._threading_handler import install_threading_hook
694 install_threading_hook(self)
695 if threading_hook is not None:
696 try:
697 threading_hook()
698 except Exception:
699 pass
700
701 input_hook = self.console.input_hook
702 if input_hook:
703 try:
704 input_hook()
705 except Exception:
706 pass
707
708 def handle1(self, block: bool = True) -> bool:
709 """Handle a single event. Wait as long as it takes if block

Callers 1

handle1Method · 0.95

Calls 1

install_threading_hookFunction · 0.85

Tested by

no test coverage detected