當前位置: 首頁>>代碼示例>>Python>>正文


Python gobject.new方法代碼示例

本文整理匯總了Python中gobject.new方法的典型用法代碼示例。如果您正苦於以下問題:Python gobject.new方法的具體用法?Python gobject.new怎麽用?Python gobject.new使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在gobject的用法示例。


在下文中一共展示了gobject.new方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _update_ipython_selected_node

# 需要導入模塊: import gobject [as 別名]
# 或者: from gobject import new [as 別名]
def _update_ipython_selected_node(self):
        # If we are running under ipython -gthread, make this new
        # selected node available as a global 'selected_node'
        # variable.
        try:
            __IPYTHON__
        except NameError:
            pass
        else:
            if self.selected_node is None:
                ns3_node = None
            else:
                self.simulation.lock.acquire()
                try:
                    ns3_node = ns.network.NodeList.GetNode(self.selected_node.node_index)
                finally:
                    self.simulation.lock.release()
            __IPYTHON__.user_ns['selected_node'] = ns3_node 
開發者ID:ntu-dsi-dcn,項目名稱:ntu-dsi-dcn,代碼行數:20,代碼來源:core.py

示例2: _update_ipython_selected_node

# 需要導入模塊: import gobject [as 別名]
# 或者: from gobject import new [as 別名]
def _update_ipython_selected_node(self):
        # If we are running under ipython -gthread, make this new
        # selected node available as a global 'selected_node'
        # variable.
        try:
            __IPYTHON__
        except NameError:
            pass
        else:
            if self.selected_node is None:
                ns3_node = None
            else:
                self.simulation.lock.acquire()
                try:
                    ns3_node = ns.network.NodeList.GetNode(self.selected_node.node_index)
                finally:
                    self.simulation.lock.release()
            self.ipython.updateNamespace({'selected_node': ns3_node}) 
開發者ID:imec-idlab,項目名稱:IEEE-802.11ah-ns-3,代碼行數:20,代碼來源:core.py

示例3: __init__

# 需要導入模塊: import gobject [as 別名]
# 或者: from gobject import new [as 別名]
def __init__(self, title=None):
        """ Initializer
        
        @param self: this object
        @param title: title
        """
        self.__title_text = None
        gtk.widget_push_composite_child()
        self.__title = gobject.new(gtk.Label, visible=True, xalign=0, yalign=0.5)
        self.__indent = gobject.new(gtk.Label, visible=True, label='    ')
        gtk.widget_pop_composite_child()
        gtk.Bin.__init__(self)
        self.__title.set_parent(self)
        self.__indent.set_parent(self)
        if title is not None:
            self.props.title = title 
開發者ID:KTH,項目名稱:royal-chaos,代碼行數:18,代碼來源:higcontainer.py

示例4: __init__

# 需要導入模塊: import gobject [as 別名]
# 或者: from gobject import new [as 別名]
def __init__(self, title=None):
        self.__title_text = None
        gtk.widget_push_composite_child()
        self.__title = gobject.new(gtk.Label, visible=True, xalign=0, yalign=0.5)
        self.__indent = gobject.new(gtk.Label, visible=True, label='    ')
        gtk.widget_pop_composite_child()
        gtk.Bin.__init__(self)
        self.__title.set_parent(self)
        self.__indent.set_parent(self)
        if title is not None:
            self.props.title = title 
開發者ID:ntu-dsi-dcn,項目名稱:ntu-dsi-dcn,代碼行數:13,代碼來源:higcontainer.py


注:本文中的gobject.new方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。