changeset 36020 | bfc9ab6c1bec |
parent 32940 | 75be14993fda |
child 38365 | bf953d218a91 |
36019:2ea0e89bca1e | 36020:bfc9ab6c1bec |
---|---|
3 > import sys |
3 > import sys |
4 > |
4 > |
5 > path = sys.argv[1] |
5 > path = sys.argv[1] |
6 > patterns = sys.argv[2:] |
6 > patterns = sys.argv[2:] |
7 > |
7 > |
8 > fp = file(path, 'wb') |
8 > fp = open(path, 'wb') |
9 > for pattern in patterns: |
9 > for pattern in patterns: |
10 > count = int(pattern[0:-1]) |
10 > count = int(pattern[0:-1]) |
11 > char = pattern[-1] + '\n' |
11 > char = pattern[-1] + '\n' |
12 > fp.write(char*count) |
12 > fp.write(char*count) |
13 > fp.close() |
13 > fp.close() |