Created
June 9, 2009 15:03
-
-
Save ento/126562 to your computer and use it in GitHub Desktop.
Get script's own location 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 | |
local_dir = os.path.dirname(__file__) | |
abs_dir = os.path.join(os.getcwd(), local_dir) | |
if __name__ == "__main__": | |
print("Hello World!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment