cgi-bin/inc.py
changeset 18 46536daf9e04
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cgi-bin/inc.py	Sat Dec 22 21:31:01 2007 +0000
@@ -0,0 +1,18 @@
+if __name__ == '__main__' :
+    raise Exception("Don't access inc.py directly")
+
+# setup env
+
+import sys
+import os, os.path
+
+def splitn (path, n) :
+    for i in xrange(0, n) :
+        path = os.path.split(path)[0]      
+    
+    return path
+        
+degal_path = splitn(os.path.join(os.getcwd(), __file__), 2)
+
+os.chdir(degal_path)
+sys.path.append(degal_path)