Skip to content

Instantly share code, notes, and snippets.

@ryo1kato
Created September 13, 2012 07:22
Show Gist options
  • Save ryo1kato/3712562 to your computer and use it in GitHub Desktop.
Save ryo1kato/3712562 to your computer and use it in GitHub Desktop.
realpath in Python
#!/usr/bin/python
import sys
import os
if len(sys.argv) <= 1:
print os.path.realpath(os.getcwd())
else:
print os.path.realpath(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment