Last active
March 3, 2025 05:57
-
-
Save z0gSh1u/a10e6c2715af05c44306e40921d485a9 to your computer and use it in GitHub Desktop.
Node.js __dirname equivalent in Python
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 os.path as path | |
| # dirname__ will be the absolute directory that current .py file is in | |
| dirname__ = path.dirname(path.abspath(__file__)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment