[tipfy] push by rodrigo.moraes - Now set_sys_path.py is here. on 2011-04-03 01:05 GMT

3 views
Skip to first unread message

ti...@googlecode.com

unread,
Apr 2, 2011, 9:05:28 PM4/2/11
to tipfy-...@googlegroups.com
Revision: a5ec9c5ca723
Author: Rodrigo Moraes <rodrigo...@gmail.com>
Date: Sat Apr 2 18:05:21 2011
Log: Now set_sys_path.py is here.
http://code.google.com/p/tipfy/source/detail?r=a5ec9c5ca723

Added:
/project/app/set_sys_path.py

=======================================
--- /dev/null
+++ /project/app/set_sys_path.py Sat Apr 2 18:05:21 2011
@@ -0,0 +1,14 @@
+# -*- coding: utf-8 -*-
+"""Sets sys.path for the library directories."""
+import os
+import sys
+
+current_path = os.path.abspath(os.path.dirname(__file__))
+
+# Add lib as primary libraries directory, with fallback to lib/dist
+# and optionally to lib/dist.zip, loaded using zipimport.
+sys.path[0:0] = [
+ os.path.join(current_path, 'lib'),
+ os.path.join(current_path, 'lib', 'dist'),
+ os.path.join(current_path, 'lib', 'dist.zip'),
+]

Reply all
Reply to author
Forward
0 new messages