Skip to content

Instantly share code, notes, and snippets.

@alejandrobernardis
Created September 10, 2012 21:04
Show Gist options
  • Select an option

  • Save alejandrobernardis/3693847 to your computer and use it in GitHub Desktop.

Select an option

Save alejandrobernardis/3693847 to your computer and use it in GitHub Desktop.
Helper Libs Paths
import os, sys
pkg = '/src/../path/to/main/file'
root_path = os.path.dirname(__file__)
sys.path.insert(0, root_path.replace(pkg, '/src'))
sys.path.insert(0, root_path.replace(pkg, '/lib'))
sys.path.insert(0, root_path.replace(pkg, '/libs'))
sys.path.insert(0, '/Volumes/Amelie/alejandro/development/library/python')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment