Last active
March 9, 2021 13:21
-
-
Save ttamg/10bdaeb08ef6e28270dcfc69a1ca2d84 to your computer and use it in GitHub Desktop.
Getting the current module's PATH for use when doing file imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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