Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 46466b4

Browse files
committed
Revert Rev 1.6
"Merge Py Idle changes: Rev 1.7 [Python-idle] loewis Convert characters from the locale's encoding on output. Reject characters outside the locale's encoding on input." Not compatible with Python 2.2.1. Forwardport as a SF patch.
1 parent 84f4803 commit 46466b4

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

Lib/idlelib/OutputWindow.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from EditorWindow import EditorWindow
33
import re
44
import tkMessageBox
5-
import IOBinding
65

76
class OutputWindow(EditorWindow):
87

@@ -35,14 +34,6 @@ def maybesave(self):
3534
# Act as output file
3635

3736
def write(self, s, tags=(), mark="insert"):
38-
# Tk assumes that byte strings are Latin-1;
39-
# we assume that they are in the locale's encoding
40-
if isinstance(s, str):
41-
try:
42-
s = unicode(s, IOBinding.encoding)
43-
except UnicodeError:
44-
# some other encoding; let Tcl deal with it
45-
pass
4637
self.text.insert(mark, s, tags)
4738
self.text.see(mark)
4839
self.text.update()

0 commit comments

Comments
 (0)