def enable_tk(self, app=None):
self._current_gui = GUI_TK<EOL>if app is None:<EOL><INDENT>import Tkinter<EOL>app = Tkinter.Tk()<EOL>app.withdraw()<EOL>self._apps[GUI_TK] = app<EOL>return app<EOL><DEDENT>
Enable event loop integration with Tk.

        Parameters
        ----------
        app : toplevel :class:`Tkinter.Tk` widget, optional.
            Running toplevel widget to use.  If not given, we probe Tk for an
            existing one, and create a new one if none is found.

        Notes
        -----
        If you have already created a :class:`Tkinter.Tk` object, the only
        thing done by this method is to register with the
        :class:`InputHookManager`, since creating that object automatically
        sets ``PyOS_InputHook``.