def generate_simcoal_from_template(model, chrs, params, out_dir='.', tp_dir=None):
 with open(((out_dir + sep) + 'tmp.par'), 'w') as stream:
  get_demography_template(stream, model, tp_dir)
  get_chr_template(stream, chrs)
 with open(((out_dir + sep) + 'tmp.par'), 'r') as par_stream:
  generate_model(par_stream, model, params, out_dir=out_dir)

def generate_simcoal_from_template ( model , chrs , params , out_dir = '.' , tp_dir = None ) : with open ( ( ( out_dir + sep ) + 'tmp.par' ) , 'w' ) as stream : get_demography_template ( stream , model , tp_dir ) get_chr_template ( stream , chrs ) with open ( ( ( out_dir + sep ) + 'tmp.par' ) , 'r' ) as par_stream : generate_model ( par_stream , model , params , out_dir = out_dir )
writes a complete simcoal2 template file .