Preferences/ConfigurationPages/EditorHighlightingStylesPage.py

changeset 97
c4086afea02b
parent 50
a36eecf45b2e
child 244
30be2b4a9721
--- a/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py	Sun Jan 31 17:11:22 2010 +0000
+++ b/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py	Sun Jan 31 18:31:28 2010 +0000
@@ -7,7 +7,7 @@
 Module implementing the Editor Highlighting Styles configuration page.
 """
 
-import os
+import io
 
 from PyQt4.QtCore import pyqtSlot, QFileInfo
 from PyQt4.QtGui import QPalette, QFileDialog, QColorDialog, QFontDialog, \
@@ -324,7 +324,7 @@
         try:
             f = open(fn, "r", encoding = "utf-8")
             try:
-                line = f.readline()
+                f.readline()
                 dtdLine = f.readline()
             finally:
                 f.close()
@@ -354,7 +354,7 @@
                     parser.parse(f)
                 except UnicodeEncodeError:
                     f.seek(0)
-                    buf = cStringIO.StringIO(f.read())
+                    buf = io.StringIO(f.read())
                     parser.parse(buf)
             finally:
                 f.close()
@@ -420,4 +420,4 @@
     @param dlg reference to the configuration dialog
     """
     page = EditorHighlightingStylesPage(dlg.getLexers())
-    return page
\ No newline at end of file
+    return page

eric ide

mercurial