def dumpToFile(self, filename):
        if self.html is not None:
            if os.path.splitext(filename)[1].lower() in ('.html', '.html'):
                with open(filename, 'wb') as fp:
                    if isinstance(self.html, bytes):
                        fp.write(self.html)
                    else:
                        codec = QtCore.QTextCodec.codecForHtml(
                                self.html.encode('utf-8'),
                                QtCore.QTextCodec.codecForName('UTF-8'))
                        fp.write(codec.fromUnicode(self.html))
            else:
                super(RichTextCellWidget, self).dumpToFile(filename)
dumpToFile(filename) -> None
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/spreadsheet/widgets/richtext/richtext.py/RichTextCellWidget.dumpToFile