--- a/QScintilla/Exporters/ExporterRTF.py Fri Mar 11 08:55:14 2011 +0100 +++ b/QScintilla/Exporters/ExporterRTF.py Fri Mar 11 16:51:57 2011 +0100 @@ -22,6 +22,7 @@ import Preferences + class ExporterRTF(ExporterBase): """ Class implementing an exporter for RTF. @@ -37,7 +38,7 @@ RTF_INFOOPEN = "{\\info " RTF_INFOCLOSE = "}" RTF_COMMENT = "{\\comment Generated by eric5's RTF export filter.}" - RTF_CREATED = "{\creatim\yr%Y\mo%m\dy%d\hr%H\min%M\sec%S}" # to be used by strftime + RTF_CREATED = "{\creatim\yr%Y\mo%m\dy%d\hr%H\min%M\sec%S}" # to be used by strftime RTF_BODYOPEN = "" RTF_BODYCLOSE = "}" @@ -55,7 +56,7 @@ RTF_COLOR = "#000000" - def __init__(self, editor, parent = None): + def __init__(self, editor, parent=None): """ Constructor @@ -147,7 +148,7 @@ bgColour = self.editor.paper() try: - f = open(filename, "w", encoding = "utf-8") + f = open(filename, "w", encoding="utf-8") styles = {} fonts = {} @@ -313,7 +314,7 @@ utf8Len = 3 elif (utf8Ch[0] & 0xC0) == 0xC0: utf8Len = 2 - column -= 1 # will be incremented again later + column -= 1 # will be incremented again later elif len(utf8Ch) == utf8Len: ch = utf8Ch.decode('utf8') if ord(ch) <= 0xff: @@ -324,7 +325,7 @@ utf8Ch = b"" utf8Len = 0 else: - column -= 1 # will be incremented again later + column -= 1 # will be incremented again later else: f.write(ch.decode()) @@ -343,4 +344,4 @@ """<p>Reason: {1}</p>""")\ .format(filename, str(err))) finally: - QApplication.restoreOverrideCursor() \ No newline at end of file + QApplication.restoreOverrideCursor()