Project

General

Profile

« Previous | Next » 

Revision 1496

cols: If column number of "*" given, get all columns

View differences:

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