Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import sys
- if len(sys.argv) < 4:
- print "USAGE:t {0} inFile1 inFile2 outputFile".format(sys.argv[0])
- sys.exit()
- fh1 = open(sys.argv[1], 'r')
- fh2 = open(sys.argv[2], 'r')
- fhO = open(sys.argv[3], 'w')
- for r1, line1 in enumerate(fh1):
- fhO.write(line1)
- if r1 % 4 == 3:
- for r2 in xrange(4):
- fhO.write(fh2.readline())
- fh1.close()
- fh2.close()
- fhO.close()
Add Comment
Please, Sign In to add comment