Last active
August 29, 2015 14:11
-
-
Save mirth/ed60f24d17a3897bded6 to your computer and use it in GitHub Desktop.
This gist adds parent directory to sys.path to be able import files from parent directory.
This file contains 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
if __name__ == '__main__' and __package__ is None: | |
from os import sys, path | |
sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment