[Idle-dev] CVS: idle OutputWindow.py,1.6,1.7

Kurt B. Kaiser kbk@users.sourceforge.net
Thu, 26 Sep 2002 17:34:33 -0700


Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv14574

Modified Files:
	OutputWindow.py 
Log Message:
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.


Index: OutputWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/OutputWindow.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** OutputWindow.py	17 Sep 2002 03:40:47 -0000	1.6
--- OutputWindow.py	27 Sep 2002 00:34:31 -0000	1.7
***************
*** 3,7 ****
  import re
  import tkMessageBox
- import IOBinding
  
  class OutputWindow(EditorWindow):
--- 3,6 ----
***************
*** 36,47 ****
  
      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.see(mark)
--- 35,38 ----