def enable_gtk(self, app=None):
import gtk<EOL>try:<EOL><INDENT>gtk.set_interactive(True)<EOL>self._current_gui = GUI_GTK<EOL><DEDENT>except AttributeError:<EOL><INDENT>from IPython.lib.inputhookgtk import inputhook_gtk<EOL>self.set_inputhook(inputhook_gtk)<EOL>self._current_gui = GUI_GTK<EOL><DEDENT>
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
           supporting magics.

        Notes
        -----
        This methods sets the PyOS_InputHook for PyGTK, which allows
        the PyGTK to integrate with terminal based applications like
        IPython.