Skip to content

Instantly share code, notes, and snippets.

@j-v
Created September 17, 2012 01:28
Show Gist options
  • Save j-v/3735102 to your computer and use it in GitHub Desktop.
Save j-v/3735102 to your computer and use it in GitHub Desktop.
Add parent directory to path
# 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