Skip to content

Instantly share code, notes, and snippets.

@Jojozzc
Created December 2, 2018 02:12
Show Gist options
  • Save Jojozzc/76c2e6a34254e5418d1191495f3f71a0 to your computer and use it in GitHub Desktop.
Save Jojozzc/76c2e6a34254e5418d1191495f3f71a0 to your computer and use it in GitHub Desktop.
Append root path to system path in python
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