Created
November 26, 2019 19:49
-
-
Save lukeorland/a27525bc5fa56df220f22e48eb07f02d to your computer and use it in GitHub Desktop.
directory containing this Python file
This file contains hidden or 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 inspect | |
import os | |
def get_dir_containing_this_file(): | |
return os.path.dirname( | |
os.path.abspath( | |
inspect.getframeinfo( | |
inspect.currentframe()).filename)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment