Project

General

Profile

« Previous | Next » 

Revision 1284

Added remove_empty to remove empty mappings in a map spreadsheet

View differences:

bin/remove_empty
1
#!/usr/bin/env python
2
# Removes empty mappings in a map spreadsheet
3
# Usage: self <map >out_map
4

  
5
import csv
6
import sys
7

  
8
def main():
9
    # Process map
10
    reader = csv.reader(sys.stdin)
11
    writer = csv.writer(sys.stdout)
12
    for row in reader:
13
        if row[1] != '': writer.writerow(row)
14

  
15
main()
0 16

  

Also available in: Unified diff