Author wujek.srujek
Recipients wujek.srujek
Date 2011-06-15.20:59:58
SpamBayes Score 2.92194e-12
Marked as misclassified No
Message-id <>
The following code produces an exception:


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>
  File "/usr/lib/python3.2/idlelib/", line 1231, in write, self.tags)
  File "/usr/lib/python3.2/idlelib/", line 1213, in write
    OutputWindow.write(self, s, tags, "iomark")
  File "/usr/lib/python3.2/idlelib/", line 40, in write
    self.text.insert(mark, s, tags)
  File "/usr/lib/python3.2/idlelib/", line 25, in insert, chars, tags)
  File "/usr/lib/python3.2/idlelib/", line 79, in insert
    self.delegate.insert(index, chars, tags)
  File "/usr/lib/python3.2/idlelib/", line 316, in insert
    UndoDelegator.insert(self, index, chars, tags)
  File "/usr/lib/python3.2/idlelib/", line 81, in insert
    self.addcmd(InsertCommand(index, chars, tags))
  File "/usr/lib/python3.2/idlelib/", line 116, in addcmd
  File "/usr/lib/python3.2/idlelib/", line 219, in do
    text.insert(self.index1, self.chars, self.tags)
  File "/usr/lib/python3.2/idlelib/", line 79, in insert
    self.delegate.insert(index, chars, tags)
  File "/usr/lib/python3.2/idlelib/", 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]

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:00wujek.srujeksetrecipients: + wujek.srujek
2011-06-15 21:00:00wujek.srujeksetmessageid: <>
2011-06-15 20:59:59wujek.srujeklinkissue12342 messages
2011-06-15 20:59:58wujek.srujekcreate