Last active
December 7, 2022 00:11
-
-
Save barbietunnie/11b0499f173e3a3c7e1226c0f2dc7450 to your computer and use it in GitHub Desktop.
Working with relative paths in Python
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 | |
ROOT_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), '..')) |
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 | |
from config.definitions import ROOT_DIR | |
print(os.path.join(ROOT_DIR, 'data', 'users.xlsx')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment