Revision 1496
Added by Aaron Marcuse-Kubitza over 12 years ago
bin/cols | ||
---|---|---|
13 | 13 |
col_nums = sys.argv[1:] |
14 | 14 |
if col_nums == []: |
15 | 15 |
raise SystemExit('Usage: '+sys.argv[0]+' col_num... <map >columns_map') |
16 |
col_nums = map(int, col_nums) # 0-based |
|
16 |
if col_nums[0] == '*': col_nums = None # list_subset() value for all columns |
|
17 |
else: col_nums = map(int, col_nums) # 0-based |
|
17 | 18 |
|
18 | 19 |
# Process map |
19 | 20 |
reader = csv.reader(sys.stdin) |
Also available in: Unified diff
cols: If column number of "*" given, get all columns