Last active
August 29, 2015 13:56
-
-
Save bitwiser/9193633 to your computer and use it in GitHub Desktop.
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
import sys | |
import os.path | |
def readFile(f): | |
if not os.path.isfile(f): | |
print('Provided file doesn\'t exist') | |
return | |
fil = open(f) | |
for line in fil: | |
f1 = line.split() | |
if len(f1) == 2: | |
print('>{0}'.format(f1[0])) | |
print(f1[1]) | |
if __name__ == '__main__': | |
if len(sys.argv) < 2: | |
print('Provide input file location.') | |
exit() | |
readFile(sys.argv[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment