Created
May 21, 2024 16:44
-
-
Save sboysel/4034ccfd10291a86366aa57ec1de7067 to your computer and use it in GitHub Desktop.
package root variable
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
""" | |
simple way to get the directory path of the current file. | |
Extension: simply add additonal `.parent`s if __file__ is in a subdirectory of ROOT | |
""" | |
import pathlib | |
ROOT = pathlib.Path(__file__).parent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment