Created
July 30, 2024 22:51
-
-
Save mbreese/b60b1a8ca1968db80d06340141b595f4 to your computer and use it in GitHub Desktop.
abspath replacement 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
#!/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