Skip to content

Instantly share code, notes, and snippets.

@falkorichter
Created September 23, 2013 13:56
Show Gist options
  • Save falkorichter/6670726 to your computer and use it in GitHub Desktop.
Save falkorichter/6670726 to your computer and use it in GitHub Desktop.
python sniplet that changes the working directory to the folder of the script.
#!/usr/bin/python
baseFolder = os.path.join(os.getcwd(),os.path.split(sys.argv[0])[0])
os.chdir(baseFolder)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment