Skip to content

Instantly share code, notes, and snippets.

@rdapaz
Created May 21, 2018 16:35
Show Gist options
  • Save rdapaz/16d08b9f528337cc9940393d1a7a328f to your computer and use it in GitHub Desktop.
Save rdapaz/16d08b9f528337cc9940393d1a7a328f to your computer and use it in GitHub Desktop.
Get a path to the folder where the script is executing from
current_path = os.path.dirname(sys.argv[0])
os.chdir(current_path)
ROOT = r'.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment