Skip to content

Instantly share code, notes, and snippets.

@anddam
Created November 4, 2013 19:46
Show Gist options
  • Save anddam/7308172 to your computer and use it in GitHub Desktop.
Save anddam/7308172 to your computer and use it in GitHub Desktop.
import sys
try:
path_to_insert = '/my/own/path'
sys.path.index(path_to_insert)
except ValueError:
sys.path.insert(1, path_to_insert)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment