def write_sff_header(header, fh, num=None):
 lines = ['Common Header:']
 if (num is not None):
  header['# of Flows'] = num
 lines.extend([('  %s: DCTB %s' % (param, header[param])) for param in header])
 fh.write(('\n'.join(lines) + '\n\n'))

def write_sff_header ( header , fh , num = None ) : lines = [ 'Common Header:' ] if ( num is not None ) : header [ '# of Flows' ] = num lines . extend ( [ ( '  %s: DCTB %s' % ( param , header [ param ] ) ) for param in header ] ) fh . write ( ( '\n' . join ( lines ) + '\n\n' ) )
writes the common header of a sff .