Revision 12914
Added by Aaron Marcuse-Kubitza over 10 years ago
repl | ||
---|---|---|
36 | 36 |
+sys.argv[0]+' <map repl [col_num] [| '+sys.argv[0] |
37 | 37 |
+' repl_1 [col_num_1]]... >new_map') |
38 | 38 |
|
39 |
text = opts.env_flag('text', False, env_names) # all patterns are plain text |
|
40 |
try: _prog_name, repl_path = sys.argv[:2] |
|
41 |
except ValueError: usage_err() |
|
42 | 39 |
col_num = None |
43 | 40 |
try: col_num = sys.argv[2] |
44 | 41 |
except IndexError: pass |
45 | 42 |
if col_num != None: col_num = int(col_num) # 0-based |
43 |
# whether all patterns are plain text |
|
44 |
# defaults to on if matching entire cells in a spreadsheet (w/ col_num) |
|
45 |
text = opts.env_flag('text', col_num != None, env_names) |
|
46 | 46 |
|
47 |
try: _prog_name, repl_path = sys.argv[:2] |
|
48 |
except ValueError: usage_err() |
|
49 |
|
|
47 | 50 |
# Get replacements |
48 | 51 |
repls = [] |
49 | 52 |
stream = open(repl_path, 'rb') |
Also available in: Unified diff
fix: bin/repl: text mode (whether all patterns are plain text) should default to on, not off, if matching entire cells in a spreadsheet