diff options
Diffstat (limited to 'creactiweb/_templates/run.py_tmpl')
-rw-r--r-- | creactiweb/_templates/run.py_tmpl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/creactiweb/_templates/run.py_tmpl b/creactiweb/_templates/run.py_tmpl new file mode 100644 index 0000000..2f78bae --- /dev/null +++ b/creactiweb/_templates/run.py_tmpl @@ -0,0 +1,24 @@ +# python import +import os, sys + +# sugar or debug root path factory +try: + from sugar.activity import activity + BUNDLE = activity.get_bundle_path() +except Exception, e: + BUNDLE = '.' + +# add lib path to current python path +sys.path.append(os.path.join(BUNDLE, 'lib')) + +# import server first +from server import Server + +# init controllers +from {{package}} import controllers + +# init the server +Server() +# while .... +while True: + continue |