Created
July 4, 2017 17:48
-
-
Save d33tah/bee8d72bb5f7fb25513bf457eb22d07a 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
#!/usr/bin/env python | |
import csv | |
import sys | |
r = csv.reader(sys.stdin) | |
max_file = 0 | |
l = [] | |
for line in r: | |
for i in range(max_file, len(line) + 1): | |
print("appending: %d" % i) | |
l.append(open(str(i), 'w')) | |
max_file = len(line) + 1 | |
for i, col in enumerate(line): | |
l[i].write('%s\n' % col) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment