|
5 |
import ns.internet |
5 |
import ns.internet |
6 |
import ns.mesh |
6 |
import ns.mesh |
7 |
import ns.wimax |
7 |
import ns.wimax |
8 |
import ns.wimax |
|
|
9 |
import ns.lte |
8 |
import ns.lte |
10 |
|
9 |
|
11 |
from gi.repository import GObject |
10 |
from gi.repository import GObject |
|
126 |
continue |
125 |
continue |
127 |
try: |
126 |
try: |
128 |
plugin_module = __import__(name) |
127 |
plugin_module = __import__(name) |
129 |
except ImportError, ex: |
128 |
except ImportError as ex: |
130 |
print >> sys.stderr, "Could not load plugin %r: %s" % (filename, str(ex)) |
129 |
print("Could not load plugin %r: %s" % (filename, str(ex)), file=sys.stderr) |
131 |
continue |
130 |
continue |
132 |
try: |
131 |
try: |
133 |
plugin_func = plugin_module.register |
132 |
plugin_func = plugin_module.register |
134 |
except AttributeError: |
133 |
except AttributeError: |
135 |
print >> sys.stderr, "Plugin %r has no 'register' function" % name |
134 |
print("Plugin %r has no 'register' function" % name, file=sys.stderr) |
136 |
else: |
135 |
else: |
137 |
#print >> sys.stderr, "Plugin %r registered" % name |
136 |
#print("Plugin %r registered" % name, file=sys.stderr) |
138 |
register_plugin(plugin_func, name, plugin_module) |
137 |
register_plugin(plugin_func, name, plugin_module) |
139 |
sys.path = old_path |
138 |
sys.path = old_path |
140 |
|
139 |
|