Module getMsgsByStation
[hide private]
[frames] | no frames]

Source Code for Module getMsgsByStation

 1  #!/usr/bin/env python 
 2   
 3  ''' 
 4  Extract msgs from one station from USCG N-AIS data 
 5  ''' 
 6  import sys 
 7  station = sys.argv[1] 
 8  for line in file(sys.argv[2]): 
 9      fields=line.split(',') 
10      for f in fields: 
11          if len(f)<2: continue 
12          if f[0] != 'r': continue 
13          if station==f: print line, 
14