'DEPRECATED since IPython 5.0
Disable GUI event loop integration.
If an application was registered, this sets its ``_in_event_loop``
attribute to False. It then calls :meth:`clear_inputhook`.'

def disable_gui(self):

    warn('`disable_gui`    is    deprecated    since    IPython    5.0    and    will    be    removed    in    future    versions.', DeprecationWarning, stacklevel=2)
    gui = self._current_gui
    if (gui in self.apps):
        self.apps[gui]._in_event_loop = False
    return self.clear_inputhook()
