Skip to content
Snippets Groups Projects
Commit 307c9324 authored by jkerdreu's avatar jkerdreu
Browse files

New run_package API

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@2073 b32b6428-25c9-4566-ad07-03861ab6144f
parent 79ebe650
No related branches found
No related tags found
No related merge requests found
from . import gw
gw.main()
from xaal.lib import helpers
helpers.run_package(gw.PACKAGE_NAME,gw.setup)
......@@ -79,16 +79,7 @@ class GW(gevent.Greenlet):
self.nodes[pkt.src].parse(pkt)
def run():
eng = Engine()
net = GW.spawn(eng)
eng.run()
def main():
try:
run()
except KeyboardInterrupt:
print("Bye Bye...")
if __name__ == '__main__':
main()
def setup(eng):
GW.spawn(eng)
return True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment