constance

Scripts for generating (an earlier obsolete version of) my personal web site
git clone https://code.djc.id.au/git/constance/
commit efdee2c2324346c14e853da645679f37b51fb8f6
parent 71dc0fbe5de22414f9435b6207759b69b263ec9b
Author: Dan Callaghan <djc@djc.id.au>
Date:   Sat, 18 Oct 2008 09:03:54 +1000

the usual sys.path mangling

Diffstat:
Mapp.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/app.py b/app.py
@@ -1,7 +1,11 @@
 
 # vim:encoding=utf-8
 
-import os, cgi, re, datetime
+import os, sys
+sys.path.insert(0, os.path.dirname(__file__))
+sys.path.insert(1, os.path.join(os.path.dirname(__file__), 'lib'))
+
+import cgi, re, datetime
 from itertools import chain
 import wsgiref.util
 from genshi.template import TemplateLoader
@@ -282,7 +286,6 @@ application = Constance
 
 
 if __name__ == '__main__':
-    import sys
     import wsgiref.simple_server
     application = StaticExports(application, {'/static': os.path.join(os.path.dirname(__file__), 'static')})
     server = wsgiref.simple_server.make_server('0.0.0.0', 8082, application)