def write(self, filename, header=None):
        """ Writes the AST as a configuration file.

            `filename`
                Filename to save configuration file to.
            `header`
                Header string to use for the file.

            Returns boolean.
            """

        origfile = self._filename

        try:
            with open(filename, 'w') as _file:
                self.writestream(_file, header)
                self._filename = filename
            return True

        except __HOLE__:
            self._filename = origfile
            return False
dataset/ETHPy150Open xtrementl/focus/focus/parser/parser.py/SettingParser.write