浏览代码

[fix] PYTHONPATH settings

asciimoo 11 年前
父节点
当前提交
fd651083f2
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      searx/webapp.py

+ 5
- 0
searx/webapp.py 查看文件

@@ -17,6 +17,11 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
17 17
 (C) 2013- by Adam Tauber, <asciimoo@gmail.com>
18 18
 '''
19 19
 
20
+if __name__ == '__main__':
21
+    from sys import path
22
+    from os.path import realpath, dirname
23
+    path.append(realpath(dirname(realpath(__file__))+'/../'))
24
+
20 25
 import json
21 26
 import cStringIO
22 27
 import os