Message138389
The following code produces an exception:
print('{:c}'.format(65536))
when executed in Idle 3.2. The stack trace:
>>> print('{:c}'.format(65536))
Traceback (most recent call last):
File "<pyshell#149>", line 1, in <module>
print('{:c}'.format(65536))
File "/usr/lib/python3.2/idlelib/PyShell.py", line 1231, in write
self.shell.write(s, self.tags)
File "/usr/lib/python3.2/idlelib/PyShell.py", line 1213, in write
OutputWindow.write(self, s, tags, "iomark")
File "/usr/lib/python3.2/idlelib/OutputWindow.py", line 40, in write
self.text.insert(mark, s, tags)
File "/usr/lib/python3.2/idlelib/Percolator.py", line 25, in insert
self.top.insert(index, chars, tags)
File "/usr/lib/python3.2/idlelib/ColorDelegator.py", line 79, in insert
self.delegate.insert(index, chars, tags)
File "/usr/lib/python3.2/idlelib/PyShell.py", line 316, in insert
UndoDelegator.insert(self, index, chars, tags)
File "/usr/lib/python3.2/idlelib/UndoDelegator.py", line 81, in insert
self.addcmd(InsertCommand(index, chars, tags))
File "/usr/lib/python3.2/idlelib/UndoDelegator.py", line 116, in addcmd
cmd.do(self.delegate)
File "/usr/lib/python3.2/idlelib/UndoDelegator.py", line 219, in do
text.insert(self.index1, self.chars, self.tags)
File "/usr/lib/python3.2/idlelib/ColorDelegator.py", line 79, in insert
self.delegate.insert(index, chars, tags)
File "/usr/lib/python3.2/idlelib/WidgetRedirector.py", line 104, in __call__
return self.tk_call(self.orig_and_operation + args)
ValueError: unsupported character
Seems to work fine in a terminal (Gnome-terminal in this case):
>>> print('{:c}'.format(0x10000))
𐀀
(my font doesn't have the glyph, but otherwise it works)
Python version:
>>> print(sys.version)
3.2 (r32:88445, Mar 25 2011, 19:56:22)
[GCC 4.5.2]
Os:
wujek@home:~$ uname -a
Linux studio 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
wujek@home:~$ cat /etc/issue
Ubuntu 11.04 |
|
Date |
User |
Action |
Args |
2011-06-15 21:00:00 | wujek.srujek | set | recipients:
+ wujek.srujek |
2011-06-15 21:00:00 | wujek.srujek | set | messageid: <1308171600.34.0.388895530939.issue12342@psf.upfronthosting.co.za> |
2011-06-15 20:59:59 | wujek.srujek | link | issue12342 messages |
2011-06-15 20:59:58 | wujek.srujek | create | |
|