def writeFile(self, text, append=False):
        '''Write File

        Write the data passed in a file specified in the global object path.
        This method is called automatically by saveData, and encode the text
        in the format specified in the global object encoding, by default this
        object is UTF-8. Use this method if you don't want to modify the data
        to write.

        Arguments: text {string} -- Text to write in the file
                   append {boolean} -- Set to True if you want to append the
                   data in the file (default: False)
        '''
        mode = 'w'

        if append:
            mode = 'a'
        try:
            with codecs.open(self.path, mode, self.encoding) as file:
                file.write(text)
        except (__HOLE__, UnicodeError):
            pass
dataset/ETHPy150Open gepd/Deviot/libs/JSONFile.py/JSONFile.writeFile