def file_iter(fname, sep=None):
 for line in open(fname):
  if (line and (line[0] != '#')):
   (yield line.split(sep))

def file_iter ( fname , sep = None ) : for line in open ( fname ) : if ( line and ( line [ 0 ] != '#' ) ) : ( yield line . split ( sep ) )
this generator iterates over a file and yields its lines splitted via the c{sep} parameter .