mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									84f4803f4f
								
							
						
					
					
						commit
						46466b4c92
					
				
					 1 changed files with 0 additions and 9 deletions
				
			
		|  | @ -2,7 +2,6 @@ | |||
| from EditorWindow import EditorWindow | ||||
| import re | ||||
| import tkMessageBox | ||||
| import IOBinding | ||||
| 
 | ||||
| class OutputWindow(EditorWindow): | ||||
| 
 | ||||
|  | @ -35,14 +34,6 @@ def maybesave(self): | |||
|     # Act as output file | ||||
| 
 | ||||
|     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) | ||||
|         self.text.update() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kurt B. Kaiser
						Kurt B. Kaiser