'Generates a file from a template, interpolating config values.'

def GenerateFile(self, input_filename=None, output_filename=None):

    if (input_filename is None):
        input_filename = (output_filename + '.in')
    if (output_filename[(-3):] == '.in'):
        output_filename = output_filename[:(-3)]
    data = open(input_filename, 'rb').read()
    logging.debug('Generating    file    %s    from    %s', output_filename, input_filename)
    with open(output_filename, 'wb') as fd:
        fd.write(config.CONFIG.InterpolateValue(data, context=self.context))
