Skip to content

Instantly share code, notes, and snippets.

@mbreese
Created July 30, 2024 22:51
Show Gist options
  • Save mbreese/b60b1a8ca1968db80d06340141b595f4 to your computer and use it in GitHub Desktop.
Save mbreese/b60b1a8ca1968db80d06340141b595f4 to your computer and use it in GitHub Desktop.
abspath replacement in python
#!/usr/bin/env python3
import os
import sys
if len(sys.argv) == 1:
print(os.path.abspath('.'))
else:
for arg in sys.argv[1:]:
print(os.path.abspath(arg))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment