def readInFilter(fname):
 filter = ''
 tmpfd = open(fname, 'r')
 for line in tmpfd:
  if ('#' in line):
   line = (line.split('#')[0] + '\n')
  filter += line
 tmpfd.close()
 return filter

def readInFilter ( fname ) : filter = '' tmpfd = open ( fname , 'r' ) for line in tmpfd : if ( '#' in line ) : line = ( line . split ( '#' ) [ 0 ] + '\n' ) filter += line tmpfd . close ( ) return filter
read in a bpf filter provided by a command line argument .