Created
May 11, 2011 11:23
-
-
Save marcellmars/966303 to your computer and use it in GitHub Desktop.
python script finds its own current path
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
#!/usr/bin/env python | |
import os | |
mypath = os.path.dirname(os.path.realpath(__file__)) | |
if __name__ == '__main__': | |
print mypath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment