Created
December 2, 2018 02:12
-
-
Save Jojozzc/76c2e6a34254e5418d1191495f3f71a0 to your computer and use it in GitHub Desktop.
Append root path to system path in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
curPath = os.path.abspath(os.path.dirname(__file__)) | |
rootPath = os.path.split(curPath)[0] | |
print('rootPath:{}'.format(rootPath)) | |
sys.path.append(rootPath) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment