def write_config(self, prefix='<STR_LIT>', name='<STR_LIT>', **kwargs):
base = os.path.join(self.tempdir, prefix) if prefix else self.tempdir<EOL>if not os.path.isdir(base):<EOL><INDENT>self.makedirs(base)<EOL><DEDENT>with open(os.path.join(base, name), '<STR_LIT>') as conf:<EOL><INDENT>conf.write("<STR_LIT>".format(self.script_name))<EOL>for k, v in kwargs.items():<EOL><INDENT>conf.write("<STR_LIT>".format(k.replace('<STR_LIT:_>', '<STR_LIT:->'), v))<EOL><DEDENT><DEDENT>
Change an environment config file.

        Applies changes to `tox.ini` relative to `tempdir/prefix`.
        If the given path prefix does not exist it is created.