Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Various changes to make imports work

  • Loading branch information...
commit 879391b205a117394d72d737daa5e3b1ea6f0cc8 1 parent 1ff5677
Ben Darnell authored
0  chat/__init__.py
View
No changes.
21 sitecustomize.py
View
@@ -0,0 +1,21 @@
+import os
+import site
+import sys
+
+base_dir = os.path.dirname(os.path.abspath(__file__))
+
+prev_sys_path = list(sys.path)
+
+# site.addsitedir adds this directory to sys.path then scans for .pth files
+# and adds them to the path too.
+site.addsitedir(os.path.join(base_dir, 'third_party'))
+
+# addsitedir adds its directories at the end, but we want our local stuff
+# to take precedence over system-installed packages.
+# See http://code.google.com/p/modwsgi/issues/detail?id=112
+new_sys_path = []
+for item in list(sys.path):
+ if item not in prev_sys_path:
+ new_sys_path.append(item)
+ sys.path.remove(item)
+sys.path[:0] = new_sys_path
1  third_party/tornado.pth
View
@@ -0,0 +1 @@
+tornado
Please sign in to comment.
Something went wrong with that request. Please try again.