def init_flowgram_file(filename=None, n=0, l=400, prefix='/tmp/'):
 if (filename is None):
  (fd, filename) = mkstemp(dir=prefix, suffix='.dat')
  close(fd)
 fh = open(filename, 'w')
 fh.write(('%d %d\n' % (n, l)))
 return (fh, filename)

def init_flowgram_file ( filename = None , n = 0 , l = 400 , prefix = '/tmp/' ) : if ( filename is None ) : ( fd , filename ) = mkstemp ( dir = prefix , suffix = '.dat' ) close ( fd ) fh = open ( filename , 'w' ) fh . write ( ( '%d %d\n' % ( n , l ) ) ) return ( fh , filename )
opens a file in plain flowgram format and writes header information .