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

SourceForge.net noreply at sourceforge.net
Sun Oct 12 15:27:46 EDT 2003


Bugs item #819860, was opened at 2003-10-08 11:57
Message generated for change (Comment added) made by jvr
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: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jurjen N.E. Bos (jneb)
Assigned to: Just van Rossum (jvr)
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

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

>Comment By: Just van Rossum (jvr)
Date: 2003-10-12 21:27

Message:
Logged In: YES 
user_id=92689

Fixed in CVS. Thanks for the report!

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

Comment By: Jack Jansen (jackjansen)
Date: 2003-10-08 12:49

Message:
Logged In: YES 
user_id=45365

Just, could you take a look at this?

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

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