Skip to content

Instantly share code, notes, and snippets.

@zjyExcelsior
Last active May 2, 2016 15:18
Show Gist options
  • Save zjyExcelsior/2bbaff8afdb3e6ce60eb67e227be0b9a to your computer and use it in GitHub Desktop.
Save zjyExcelsior/2bbaff8afdb3e6ce60eb67e227be0b9a to your computer and use it in GitHub Desktop.
在当前目录下,将该目录下的package文件夹路径添加到系统路径中
#coding=utf-8
import os
import sys
curdir = os.path.dirname(os.path.realpath(__file__))
sys_paths = []
sys_paths.append(os.path.join(curdir, "packages"))
for p in sys_paths:
sys.path.insert(0, p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment