本文整理匯總了Python中base.plugins方法的典型用法代碼示例。如果您正苦於以下問題:Python base.plugins方法的具體用法?Python base.plugins怎麽用?Python base.plugins使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類base
的用法示例。
在下文中一共展示了base.plugins方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import base [as 別名]
# 或者: from base import plugins [as 別名]
def __init__(self):
assert Visualizer.INSTANCE is None
Visualizer.INSTANCE = self
super(Visualizer, self).__init__()
self.nodes = {} # node index -> Node
self.channels = {} # id(ns3.Channel) -> Channel
self.window = None # toplevel window
self.canvas = None # goocanvas.Canvas
self.time_label = None # gtk.Label
self.play_button = None # gtk.ToggleButton
self.zoom = None # gtk.Adjustment
self._scrolled_window = None # gtk.ScrolledWindow
self.links_group = goocanvas.Group()
self.channels_group = goocanvas.Group()
self.nodes_group = goocanvas.Group()
self._update_timeout_id = None
self.simulation = SimulationThread(self)
self.selected_node = None # node currently selected
self.speed = 1.0
self.information_windows = []
self._transmission_arrows = []
self._last_transmissions = []
self._drop_arrows = []
self._last_drops = []
self._show_transmissions_mode = None
self.set_show_transmissions_mode(ShowTransmissionsMode.ALL)
self._panning_state = None
self.node_size_adjustment = None
self.transmissions_smoothing_adjustment = None
self.sample_period = SAMPLE_PERIOD
self.node_drag_state = None
self.follow_node = None
self.shell_window = None
self.create_gui()
for plugin in plugins:
plugin(self)
示例2: __init__
# 需要導入模塊: import base [as 別名]
# 或者: from base import plugins [as 別名]
def __init__(self):
"""!
Initializer function.
@param self: class object.
@return none
"""
assert Visualizer.INSTANCE is None
Visualizer.INSTANCE = self
super(Visualizer, self).__init__()
self.nodes = {} # node index -> Node
self.channels = {} # id(ns3.Channel) -> Channel
self.window = None # toplevel window
self.canvas = None # goocanvas.Canvas
self.time_label = None # gtk.Label
self.play_button = None # gtk.ToggleButton
self.zoom = None # gtk.Adjustment
self._scrolled_window = None # gtk.ScrolledWindow
self.links_group = goocanvas.Group()
self.channels_group = goocanvas.Group()
self.nodes_group = goocanvas.Group()
self._update_timeout_id = None
self.simulation = SimulationThread(self)
self.selected_node = None # node currently selected
self.speed = 1.0
self.information_windows = []
self._transmission_arrows = []
self._last_transmissions = []
self._drop_arrows = []
self._last_drops = []
self._show_transmissions_mode = None
self.set_show_transmissions_mode(ShowTransmissionsMode.ALL)
self._panning_state = None
self.node_size_adjustment = None
self.transmissions_smoothing_adjustment = None
self.sample_period = SAMPLE_PERIOD
self.node_drag_state = None
self.follow_node = None
self.shell_window = None
self.create_gui()
for plugin in plugins:
plugin(self)