Skip to content

Instantly share code, notes, and snippets.

@ttamg
Last active March 9, 2021 13:21
Show Gist options
  • Save ttamg/10bdaeb08ef6e28270dcfc69a1ca2d84 to your computer and use it in GitHub Desktop.
Save ttamg/10bdaeb08ef6e28270dcfc69a1ca2d84 to your computer and use it in GitHub Desktop.
Getting the current module's PATH for use when doing file imports
import os
CWD = os.path.dirname(os.path.abspath(__file__))
#CWD then has the absolute path to this current file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment