MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / return_control

Function return_control

pydevconsole.py:139–155  ·  view source on GitHub ↗

A function that the inputhooks can call (via inputhook.stdin_ready()) to find out if they should cede control and return

()

Source from the content-addressed store, hash-verified

137 from pydev_ipython.inputhook import set_return_control_callback
138
139 def return_control():
140 """A function that the inputhooks can call (via inputhook.stdin_ready()) to find
141 out if they should cede control and return"""
142 if _ProcessExecQueueHelper._debug_hook:
143 # Some of the input hooks check return control without doing
144 # a single operation, so we don't return True on every
145 # call when the debug hook is in place to allow the GUI to run
146 # XXX: Eventually the inputhook code will have diverged enough
147 # from the IPython source that it will be worthwhile rewriting
148 # it rather than pretending to maintain the old API
149 _ProcessExecQueueHelper._return_control_osc = not _ProcessExecQueueHelper._return_control_osc
150 if _ProcessExecQueueHelper._return_control_osc:
151 return True
152
153 if not interpreter.exec_queue.empty():
154 return True
155 return False
156
157 set_return_control_callback(return_control)
158

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected