Created
April 26, 2012 07:37
-
-
Save treyhunner/2497220 to your computer and use it in GitHub Desktop.
Test file for OS path representation
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
"""File for testing OS path separators in Python | |
Execute this file like this: | |
python test_path.py c:/path/to/a/file.txt | |
""" | |
import sys | |
import os | |
print sys.argv | |
print os.sep | |
print sys.argv[1].replace(os.sep, '/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment