When running the attached program, it will fail with above message on
Control-2 only! All other control keys work happily.
The same program under MS-Windows seems to work (I am under Linux, so I
can't switch easily).
My version of Python:
Python 3.1 (r31:73572, Jul 18 2009, 08:33:59)
[GCC 4.3.3] on linux2
uname -a: Linux lin-wpl 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30
19:49:51 UTC 2009 i686 GNU/Linux
Do I have to replace the line:
self.c.bind('<Control-Key-' + str(i) + '>',
lambda x=str(i): self.key_control_num(x))
with something different? str->unicode, bytes???
This does not help either:
bytes("<Control-Key-" + str(i) + ">", 'utf-8')
This program has been converted via 2to3. |