This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PythonIDE interactive window Unicode bug
Type: Stage:
Components: macOS Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jvr Nosy List: jackjansen, jneb, jvr
Priority: normal Keywords:

Created on 2003-10-08 09:57 by jneb, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Messages (3)
msg18578 - (view) Author: Jurjen N.E. Bos (jneb) * Date: 2003-10-08 09:57
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
msg18579 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-10-08 10:49
Logged In: YES 
user_id=45365

Just, could you take a look at this?
msg18580 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2003-10-12 19:27
Logged In: YES 
user_id=92689

Fixed in CVS. Thanks for the report!
History
Date User Action Args
2022-04-10 16:11:39adminsetgithub: 39383
2003-10-08 09:57:52jnebcreate