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

Method enable

IPython/lib/inputhook.py:460–486  ·  view source on GitHub ↗

DEPRECATED since IPython 5.0 Enable event loop integration with PyGTK. Parameters ---------- app : ignored Ignored, it's only a placeholder to keep the call signature of all gui activation methods consistent, which simplifies the logic of

(self, app=None)

Source from the content-addressed store, hash-verified

458@inputhook_manager.register('gtk')
459class GtkInputHook(InputHookBase):
460 def enable(self, app=None):
461 """DEPRECATED since IPython 5.0
462
463 Enable event loop integration with PyGTK.
464
465 Parameters
466 ----------
467 app : ignored
468 Ignored, it's only a placeholder to keep the call signature of all
469 gui activation methods consistent, which simplifies the logic of
470 supporting magics.
471
472 Notes
473 -----
474 This methods sets the PyOS_InputHook for PyGTK, which allows
475 the PyGTK to integrate with terminal based applications like
476 IPython.
477 """
478 warn("This function is deprecated since IPython 5.0 and will be removed in future versions.",
479 DeprecationWarning, stacklevel=2)
480 import gtk
481 try:
482 gtk.set_interactive(True)
483 except AttributeError:
484 # For older versions of gtk, use our own ctypes version
485 from IPython.lib.inputhookgtk import inputhook_gtk
486 self.manager.set_inputhook(inputhook_gtk)
487
488
489@inputhook_manager.register('tk')

Callers

nothing calls this directly

Calls 1

set_inputhookMethod · 0.80

Tested by

no test coverage detected