def write_utf8(self, text):
        try:
            import codecs
            f = codecs.open(self.filepath, encoding='utf_8', mode='w')
        except __HOLE__ as ioe:
            sys.stderr.write("Glue Plugin Error: Unable to open file for write with the write_utf8() method.")
            raise ioe
        try:
            f.write(text)
        except Exception as e:
            sys.stderr.write("Glue Plugin Error: Unable to write UTF-8 encoded text to file with the write_utf8() method.")
            raise e
        finally:
            f.close()
dataset/ETHPy150Open chrissimpkins/glue/GlueIO.py/FileWriter.write_utf8