QScintilla/Exporters/ExporterHTML.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
--- a/QScintilla/Exporters/ExporterHTML.py	Fri Jan 01 16:11:36 2010 +0000
+++ b/QScintilla/Exporters/ExporterHTML.py	Sat Jan 02 15:11:35 2010 +0000
@@ -16,7 +16,7 @@
 from PyQt4.QtGui import *
 from PyQt4.Qsci import QsciScintilla
 
-from ExporterBase import ExporterBase
+from .ExporterBase import ExporterBase
 
 import Preferences
 import Utilities
@@ -73,7 +73,7 @@
             styleIsUsed[QsciScintilla.STYLE_DEFAULT] = True
             
             try:
-                f = open(filename, "wb")
+                f = open(filename, "w")
                 
                 f.write(
                     '''<!DOCTYPE html PUBLIC "-//W3C//DTD'''
@@ -350,14 +350,14 @@
                 
                 f.write('''</body>\n</html>\n''')
                 f.close()
-            except IOError, err:
+            except IOError as err:
                 QApplication.restoreOverrideCursor()
                 QMessageBox.critical(self.editor,
                     self.trUtf8("Export source"),
                     self.trUtf8(\
                         """<p>The source could not be exported to <b>{0}</b>.</p>"""
                         """<p>Reason: {1}</p>""")\
-                        .format(filename, unicode(err)),
+                        .format(filename, str(err)),
                     QMessageBox.StandardButtons(\
                         QMessageBox.Ok))
         finally:

eric ide

mercurial