def _par_write(self, dirname):
filename = dirname + '<STR_LIT:/>' + '<STR_LIT>'<EOL>with open(filename, '<STR_LIT:w>') as parfile:<EOL><INDENT>for template in self.templates:<EOL><INDENT>for key in template.__dict__.keys():<EOL><INDENT>if key not in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>parfile.write(key + '<STR_LIT>' +<EOL>str(template.__dict__[key]) + '<STR_LIT:U+002CU+0020>')<EOL><DEDENT><DEDENT>parfile.write('<STR_LIT:\n>')<EOL><DEDENT><DEDENT>return self<EOL>
Internal write function to write a formatted parameter file.

:type dirname: str
:param dirname: Directory to write the parameter file to.