MCPcopy Create free account
hub / github.com/ipython/ipython / clear_inputhook

Method clear_inputhook

IPython/lib/inputhook.py:166–186  ·  view source on GitHub ↗

DEPRECATED since IPython 5.0 Set PyOS_InputHook to NULL and return the previous one. Parameters ---------- app : optional, ignored This parameter is allowed only so that clear_inputhook() can be called with a similar interface as all the ``enable

(self, app=None)

Source from the content-addressed store, hash-verified

164 return original
165
166 def clear_inputhook(self, app=None):
167 """DEPRECATED since IPython 5.0
168
169 Set PyOS_InputHook to NULL and return the previous one.
170
171 Parameters
172 ----------
173 app : optional, ignored
174 This parameter is allowed only so that clear_inputhook() can be
175 called with a similar interface as all the ``enable_*`` methods. But
176 the actual value of the parameter is ignored. This uniform interface
177 makes it easier to have user-level entry points in the main IPython
178 app like :meth:`enable_gui`."""
179 warn("`clear_inputhook` is deprecated since IPython 5.0 and will be removed in future versions.",
180 DeprecationWarning, stacklevel=2)
181 pyos_inputhook_ptr = self.get_pyos_inputhook()
182 original = self.get_pyos_inputhook_as_func()
183 pyos_inputhook_ptr.value = ctypes.c_void_p(None).value
184 allow_CTRL_C()
185 self._reset()
186 return original
187
188 def clear_app_refs(self, gui=None):
189 """DEPRECATED since IPython 5.0

Callers 2

disable_guiMethod · 0.95
inputhook_qt4Function · 0.80

Calls 3

get_pyos_inputhookMethod · 0.95
_resetMethod · 0.95

Tested by

no test coverage detected