Created
September 17, 2012 01:28
-
-
Save j-v/3735102 to your computer and use it in GitHub Desktop.
Add parent directory to path
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
# Add parent directory to path, to allow script's access to modules | |
abs_path = os.path.abspath(os.path.dirname(__file__)) | |
parent_dir = os.path.join(abs_path, os.path.pardir) | |
sys.path.insert(0, parent_dir) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment