Python gtk 模块,set_interactive() 实例源码

我们从Python开源项目中,提取了以下4个代码示例,用于说明如何使用gtk.set_interactive()

项目:leetcode    作者:thomasyimgit    | 项目源码 | 文件源码
def enable(self, app=None):
        """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
           supporting magics.

        Notes
        -----
        This methods sets the PyOS_InputHook for PyGTK, which allows
        the PyGTK to integrate with terminal based applications like
        IPython.
        """
        warn("This function is deprecated since IPython 5.0 and will be removed in future versions.",
                DeprecationWarning, stacklevel=2)
        import gtk
        try:
            gtk.set_interactive(True)
        except AttributeError:
            # For older versions of gtk, use our own ctypes version
            from IPython.lib.inputhookgtk import inputhook_gtk
            self.manager.set_inputhook(inputhook_gtk)
项目:Repobot    作者:Desgard    | 项目源码 | 文件源码
def enable(self, app=None):
        """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
           supporting magics.

        Notes
        -----
        This methods sets the PyOS_InputHook for PyGTK, which allows
        the PyGTK to integrate with terminal based applications like
        IPython.
        """
        warn("This function is deprecated since IPython 5.0 and will be removed in future versions.",
                DeprecationWarning, stacklevel=2)
        import gtk
        try:
            gtk.set_interactive(True)
        except AttributeError:
            # For older versions of gtk, use our own ctypes version
            from IPython.lib.inputhookgtk import inputhook_gtk
            self.manager.set_inputhook(inputhook_gtk)
项目:blender    作者:gastrodia    | 项目源码 | 文件源码
def enable(self, app=None):
        """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
           supporting magics.

        Notes
        -----
        This methods sets the PyOS_InputHook for PyGTK, which allows
        the PyGTK to integrate with terminal based applications like
        IPython.
        """
        warn("This function is deprecated since IPython 5.0 and will be removed in future versions.",
                DeprecationWarning, stacklevel=2)
        import gtk
        try:
            gtk.set_interactive(True)
        except AttributeError:
            # For older versions of gtk, use our own ctypes version
            from IPython.lib.inputhookgtk import inputhook_gtk
            self.manager.set_inputhook(inputhook_gtk)
项目:yatta_reader    作者:sound88    | 项目源码 | 文件源码
def enable(self, app=None):
        """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
           supporting magics.

        Notes
        -----
        This methods sets the PyOS_InputHook for PyGTK, which allows
        the PyGTK to integrate with terminal based applications like
        IPython.
        """
        warn("This function is deprecated since IPython 5.0 and will be removed in future versions.",
                DeprecationWarning, stacklevel=2)
        import gtk
        try:
            gtk.set_interactive(True)
        except AttributeError:
            # For older versions of gtk, use our own ctypes version
            from IPython.lib.inputhookgtk import inputhook_gtk
            self.manager.set_inputhook(inputhook_gtk)