Python gobject.new() Examples
The following are 22
code examples of gobject.new().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
gobject
, or try the search function
.
Example #1
Source File: core.py From ntu-dsi-dcn with GNU General Public License v2.0 | 6 votes |
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
Example #2
Source File: core.py From IEEE-802.11ah-ns-3 with GNU General Public License v2.0 | 6 votes |
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})
Example #3
Source File: core.py From Tocino with GNU General Public License v2.0 | 6 votes |
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})
Example #4
Source File: core.py From ns3-load-balance with GNU General Public License v2.0 | 6 votes |
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})
Example #5
Source File: higcontainer.py From ns3-802.11ad with GNU General Public License v2.0 | 6 votes |
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
Example #6
Source File: core.py From 802.11ah-ns3 with GNU General Public License v2.0 | 6 votes |
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})
Example #7
Source File: core.py From ns3-802.11ad with GNU General Public License v2.0 | 6 votes |
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})
Example #8
Source File: core.py From ns3-rdma with GNU General Public License v2.0 | 6 votes |
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
Example #9
Source File: core.py From royal-chaos with MIT License | 6 votes |
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})
Example #10
Source File: higcontainer.py From royal-chaos with MIT License | 6 votes |
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
Example #11
Source File: core.py From ns-3-dev-git with GNU General Public License v2.0 | 6 votes |
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})
Example #12
Source File: core.py From ns3-ecn-sharp with GNU General Public License v2.0 | 6 votes |
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})
Example #13
Source File: core.py From CRE-NS3 with GNU General Public License v2.0 | 6 votes |
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
Example #14
Source File: higcontainer.py From Tocino with GNU General Public License v2.0 | 5 votes |
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
Example #15
Source File: higcontainer.py From ns3-ecn-sharp with GNU General Public License v2.0 | 5 votes |
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
Example #16
Source File: higcontainer.py From CRE-NS3 with GNU General Public License v2.0 | 5 votes |
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
Example #17
Source File: higcontainer.py From ns-3-dev-git with GNU General Public License v2.0 | 5 votes |
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
Example #18
Source File: higcontainer.py From ns3-rdma with GNU General Public License v2.0 | 5 votes |
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
Example #19
Source File: higcontainer.py From 802.11ah-ns3 with GNU General Public License v2.0 | 5 votes |
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
Example #20
Source File: higcontainer.py From ns3-load-balance with GNU General Public License v2.0 | 5 votes |
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
Example #21
Source File: higcontainer.py From IEEE-802.11ah-ns-3 with GNU General Public License v2.0 | 5 votes |
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
Example #22
Source File: higcontainer.py From ntu-dsi-dcn with GNU General Public License v2.0 | 5 votes |
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