Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
python script finds its own current path
#!/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