Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/creactiweb/_templates/run.py_tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'creactiweb/_templates/run.py_tmpl')
-rw-r--r--creactiweb/_templates/run.py_tmpl24
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