Commit 46466b4c authored by Kurt B. Kaiser's avatar Kurt B. Kaiser

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.
parent 84f4803f
...@@ -2,7 +2,6 @@ from Tkinter import * ...@@ -2,7 +2,6 @@ from Tkinter import *
from EditorWindow import EditorWindow from EditorWindow import EditorWindow
import re import re
import tkMessageBox import tkMessageBox
import IOBinding
class OutputWindow(EditorWindow): class OutputWindow(EditorWindow):
...@@ -35,14 +34,6 @@ class OutputWindow(EditorWindow): ...@@ -35,14 +34,6 @@ class OutputWindow(EditorWindow):
# Act as output file # Act as output file
def write(self, s, tags=(), mark="insert"): def write(self, s, tags=(), mark="insert"):
# Tk assumes that byte strings are Latin-1;
# we assume that they are in the locale's encoding
if isinstance(s, str):
try:
s = unicode(s, IOBinding.encoding)
except UnicodeError:
# some other encoding; let Tcl deal with it
pass
self.text.insert(mark, s, tags) self.text.insert(mark, s, tags)
self.text.see(mark) self.text.see(mark)
self.text.update() self.text.update()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment