diff options
| author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-06-17 21:43:33 +0000 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-06-17 21:43:33 +0000 |
| commit | 870f09a7f4296712de404dccea1c3a7bf52f66c3 (patch) | |
| tree | 451c98f6c8e68d5dfc3aac4ad68a4b96d1fbbdf3 | |
| parent | 7c9627b4de767ca794ab6086b1fd64b02fb3e235 (diff) | |
| download | cpython-git-870f09a7f4296712de404dccea1c3a7bf52f66c3.tar.gz | |
Issue #8203: Fix IDLE Credits dialog: view_file() uses its encoding argument.
| -rw-r--r-- | Lib/idlelib/textView.py | 6 | ||||
| -rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/Lib/idlelib/textView.py b/Lib/idlelib/textView.py index 3f3c247789..e5c551ad83 100644 --- a/Lib/idlelib/textView.py +++ b/Lib/idlelib/textView.py @@ -62,11 +62,7 @@ def view_text(parent, title, text): 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', @@ -2047,6 +2047,8 @@ Installation 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. |
