Skip to content

Instantly share code, notes, and snippets.

@bitwiser
Last active August 29, 2015 13:56
Show Gist options
  • Save bitwiser/9193633 to your computer and use it in GitHub Desktop.
Save bitwiser/9193633 to your computer and use it in GitHub Desktop.
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