class_docstr: DEPRECATED since IPython 5.0
  
  Manage PyOS_InputHook for different GUI toolkits.
  
  This class installs various hooks under ``PyOSInputHook`` to handle
  GUI event loop integration.
class_docstr_tok: ["DEPRECATED","since","IPython","5.0","Manage","PyOS_InputHook","for","different","GUI","toolkits",".","This","class","installs","various","hooks","under","``","PyOSInputHook","``","to","handle","GUI","event","loop","integration","."]
docstr: DEPRECATED since IPython 5.0
  
  Switch amongst GUI input hooks by name.
  
  This is a higher level method than :meth:`set_inputhook` - it uses the
  GUI name to look up a registered object which enables the input hook
  for that GUI.
  
  Parameters
  ----------
  gui : optional, string or None
    If None (or 'none'), clears input hook, otherwise it must be one
    of the recognized GUI names (see ``GUI_*`` constants in module).
  
  app : optional, existing application object.
    For toolkits that have the concept of a global app, you can supply an
    existing one.  If not given, the toolkit will be probed for one, and if
    none is found, a new one will be created.  Note that GTK does not have
    this concept, and passing an app if ``gui=="GTK"`` will raise an error.
  
  Returns
  -------
  The output of the underlying gui switch routine, typically the actual
  PyOS_InputHook wrapper object or the GUI toolkit app created, if there was
  one.
code: def enable_gui(self, gui=None, app=None):
      """DEPRECATED since IPython 5.0
  
      Switch amongst GUI input hooks by name.
  
      This is a higher level method than :meth:`set_inputhook` - it uses the
      GUI name to look up a registered object which enables the input hook
      for that GUI.
  
      Parameters
      ----------
      gui : optional, string or None
        If None (or 'none'), clears input hook, otherwise it must be one
        of the recognized GUI names (see ``GUI_*`` constants in module).
  
      app : optional, existing application object.
        For toolkits that have the concept of a global app, you can supply an
        existing one.  If not given, the toolkit will be probed for one, and if
        none is found, a new one will be created.  Note that GTK does not have
        this concept, and passing an app if ``gui=="GTK"`` will raise an error.
  
      Returns
      -------
      The output of the underlying gui switch routine, typically the actual
      PyOS_InputHook wrapper object or the GUI toolkit app created, if there was
      one.
      """
      warn(
          "`enable_gui` is deprecated since IPython 5.0 and will be removed in future versions.",
          DeprecationWarning,
          stacklevel=2,
      )
      if gui in (None, GUI_NONE):
          return self.disable_gui()
  
      if gui in self.aliases:
          return self.enable_gui(self.aliases[gui], app)
  
      try:
          gui_hook = self.guihooks[gui]
      except KeyError:
          e = "Invalid GUI request {!r}, valid ones are: {}"
          raise ValueError(e.format(gui, ", ".join(self.guihooks)))
      self._current_gui = gui
  
      app = gui_hook.enable(app)
      if app is not None:
          app._in_event_loop = True
          self.apps[gui] = app
      return app
  
imports: import os
  import platform
  import sys
  from distutils.version import LooseVersion
  from warnings import warn
label_desc: Use image node_id 10 for calling the InputHookManager obj's underlying member method code with example usage: obj.enable_gui(gui, app) and returns: app, self, self