[Python-checkins] r82057 - in python/branches/py3k: Lib/idlelib/textView.py Misc/NEWS

victor.stinner python-checkins at python.org
Thu Jun 17 23:43:33 CEST 2010


Author: victor.stinner
Date: Thu Jun 17 23:43:33 2010
New Revision: 82057

Log:
Issue #8203: Fix IDLE Credits dialog: view_file() uses its encoding argument.


Modified:
   python/branches/py3k/Lib/idlelib/textView.py
   python/branches/py3k/Misc/NEWS

Modified: python/branches/py3k/Lib/idlelib/textView.py
==============================================================================
--- python/branches/py3k/Lib/idlelib/textView.py	(original)
+++ python/branches/py3k/Lib/idlelib/textView.py	Thu Jun 17 23:43:33 2010
@@ -62,11 +62,7 @@
 
 def view_file(parent, title, filename, encoding=None):
     try:
-        if encoding:
-            import codecs
-            textFile = codecs.open(filename, 'r')
-        else:
-            textFile = open(filename, 'r')
+        textFile = open(filename, 'r', encoding=encoding)
     except IOError:
         import tkinter.messagebox as tkMessageBox
         tkMessageBox.showerror(title='File Load Error',

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Thu Jun 17 23:43:33 2010
@@ -2047,6 +2047,8 @@
 Library
 -------
 
+- Issue #8203: Fix IDLE Credits dialog: view_file() uses its encoding argument.
+
 - Issue #5311: bdist_msi can now build packages that do not depend on a
   specific Python version.
 


More information about the Python-checkins mailing list