QScintilla/Exporters/ExporterHTML.py

changeset 537
72b32daeb8d6
parent 535
4b00d7336e19
child 564
b3d966393ba9
equal deleted inserted replaced
536:6d8d39753c82 537:72b32daeb8d6
13 import os 13 import os
14 14
15 from PyQt4.QtCore import * 15 from PyQt4.QtCore import *
16 from PyQt4.QtGui import * 16 from PyQt4.QtGui import *
17 from PyQt4.Qsci import QsciScintilla 17 from PyQt4.Qsci import QsciScintilla
18
19 from E5Gui import E5MessageBox
18 20
19 from .ExporterBase import ExporterBase 21 from .ExporterBase import ExporterBase
20 22
21 import Preferences 23 import Preferences
22 import Utilities 24 import Utilities
389 f = open(filename, "w", encoding = "utf-8") 391 f = open(filename, "w", encoding = "utf-8")
390 f.write(html) 392 f.write(html)
391 f.close() 393 f.close()
392 except IOError as err: 394 except IOError as err:
393 QApplication.restoreOverrideCursor() 395 QApplication.restoreOverrideCursor()
394 QMessageBox.critical(self.editor, 396 E5MessageBox.critical(self.editor,
395 self.trUtf8("Export source"), 397 self.trUtf8("Export source"),
396 self.trUtf8(\ 398 self.trUtf8(\
397 """<p>The source could not be exported to <b>{0}</b>.</p>""" 399 """<p>The source could not be exported to <b>{0}</b>.</p>"""
398 """<p>Reason: {1}</p>""")\ 400 """<p>Reason: {1}</p>""")\
399 .format(filename, str(err))) 401 .format(filename, str(err)))

eric ide

mercurial