Issue 32 in glumpy: _keyboard_translate raises an exception

1 view
Skip to first unread message

glu...@googlecode.com

unread,
Jul 5, 2013, 3:05:05 AM7/5/13
to glumpy...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 32 by anntzer....@gmail.com: _keyboard_translate raises an
exception
http://code.google.com/p/glumpy/issues/detail?id=32

Running most demos (on Arch Linux, freeglut 2.8.1, python 2.7.5, numpy
1.7.1, pyopengl 3.0.2, and a checkout of the latest source (94b7995)), I
get an AttributeError thrown by _keyboard_translate when using the arrow
keys. This is simply because "code" is sometimes an integer, so there is
no "lower" attribute and thus the part checking code against
glut.GLUT_KEY_* should be done differently, e.g.

try:
ascii = ord(code.lower())
except AttributeError:
return {glut.GLUT_KEY_*: key.*,...}[code]
else:
...

which fixes the problem.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

glu...@googlecode.com

unread,
Jul 8, 2013, 2:45:26 AM7/8/13
to glumpy...@googlegroups.com
Updates:
Status: Fixed

Comment #1 on issue 32 by Nicolas...@gmail.com: _keyboard_translate
Thanks, it has been fixed.
Reply all
Reply to author
Forward
0 new messages