parameters: (d, template_filename, extra = "")
docstring: Given a dictionary D and a TEMPLATE_FILENAME, expand template into output file
docstring_summary: Given a dictionary D and a TEMPLATE_FILENAME, expand template into output file
docstring_tokens: Given a dictionary D and a TEMPLATE_FILENAME expand template into output file
function: def expand_template (d, template_filename, extra = ""):
      '''Given a dictionary D and a TEMPLATE_FILENAME, expand template into output file
      '''
      global do_sources
      output_extension = extract_extension (template_filename)
      template = open_src (template_filename, 'r')
      output_name = d['NAME'] + extra + '.' + output_extension
      log_output_name (output_name)
      if do_sources:
          output = open (output_name, 'w')
          do_substitution (d, template, output)
          output.close ()
      template.close ()
function_tokens: def expand_template ( d , template_filename , extra = "" ) : global do_sources output_extension = extract_extension ( template_filename ) template = open_src ( template_filename , 'r' ) output_name = d [ 'NAME' ] + extra + '.' + output_extension log_output_name ( output_name ) if do_sources : output = open ( output_name , 'w' ) do_substitution ( d , template , output ) output . close ( ) template . close ( )