Skip to content

Instantly share code, notes, and snippets.

@quietcricket
Created December 31, 2019 03:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quietcricket/dc0fdb8beed884a0bf85c5fa71861451 to your computer and use it in GitHub Desktop.
Save quietcricket/dc0fdb8beed884a0bf85c5fa71861451 to your computer and use it in GitHub Desktop.
Change python's working directory in script
web_dir = os.path.join(os.path.dirname(__file__), 'public')
os.chdir(web_dir)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment