39 def generate_file(self,overwrite,full_qualified_filename,template_file):
40 if template_file!=
None and write_file(overwrite,self.
default_overwrite,full_qualified_filename):
42 print(
"[{}] writes {}".format(inspect.getfile(self.
__class__), full_qualified_filename ))
43 with open( os.path.realpath(template_file),
"r" )
as input:
44 template = input.read()
45 rendered_text = template.format(**self.
d)
47 rendered_text = WARNING_BANNER + rendered_text
48 with open( full_qualified_filename,
"w" )
as output:
49 output.write( rendered_text )