Revision 6701
Added by Aaron Marcuse-Kubitza about 12 years ago
bin/repl | ||
---|---|---|
48 | 48 |
reader = csv.reader(sys.stdin) |
49 | 49 |
writer = csv.writer(sys.stdout) |
50 | 50 |
cols = reader.next() |
51 |
label, root = maps.col_info(cols[col_num])[:2] |
|
52 |
if label != repl_in: raise SystemExit('Map error: Map column '+ |
|
53 |
str(col_num)+' label "'+label+'" doesn\'t match replacements input ' |
|
54 |
'column label "'+repl_in+'"') |
|
55 |
cols[col_num] = repl_out+sep+repl_all(root) |
|
56 | 51 |
writer.writerow(cols) |
57 | 52 |
for row in reader: |
58 | 53 |
row[col_num] = repl_all(row[col_num]) |
Also available in: Unified diff
repl: column mode: Removed parsing and checking of column name, which prevents using repl for general-purpose regexp/word replacement