[Python-bugs-list] [ python-Bugs-819860 ] PythonIDE interactive window Unicode bug

SourceForge.net noreply at sourceforge.net
Wed Oct 8 05:57:53 EDT 2003


Bugs item #819860, was opened at 2003-10-08 09:57
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=819860&group_id=5470

Category: Macintosh
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jurjen N.E. Bos (jneb)
Assigned to: Jack Jansen (jackjansen)
Summary: PythonIDE interactive window Unicode bug

Initial Comment:
Platform: OS X 10.2.8
Python 2.3 final, running PythonIDE, but I guess the bug is 
also in 2.3.2.
In the "Python Interactive" window (characters between 
acute brackets to be interpreted by humans):
>>> print "<option-v>"
<square root sign>
>>> print u"<option-v>"
<dialog opens, saying UnicodeEncodeError: ...>

That's not bad, because it cannot be printed in ASCII. 
Fine.
But now, at every CR, the dialog opens again!

The same problem when running code in an edit window; 
there you get in a state that any print command gives this 
error.

I managed to fix it, but I am not so sure this is the right 
way to do it.
I changed PyConsole.ConsoleTextWidget.flush:
There are two lines (that are not together, but can safely 
be moved together)
   self.ted.WEInsert(stuff, None, None)
   self._buf = ""
and I replaced this by
   try: self.ted.WEInsert(stuff, None, None)
   finally: self._buf = ""

The same code occurs in PyConsole.PyOutput.flush(); this 
fixes the bug in the other case.
- Jurjen

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=819860&group_id=5470



More information about the Python-bugs-list mailing list