Disclaimer: I’m a noob.
I’ve installed Python 3.2 (r32:88452) and ActiveTcl 8.5.9.2 (build 294317) on my OSX 10.6. Both installed without any errors, and I’ve already managed to run a .PY through Terminal. It runs okay.
I run IDLE and it doesn’t show any errors. But whenever I press the quote key (‘), nothing happens. The same with [shift] pressed (“). The characters just don’t register. The same happens with the ‘backtick’/tilde key, [shift] pressed or otherwise.
I’m using a U.S. International keyboard layout.
I’ve tried opening the Keyboard Viewer. Both keys, single quote and ‘backtick’, are orange-colored. (I had never noticed that until now.) In any other application, whenever they’re clicked, the corresponding character is input — but nothing happens from within the Python IDLE.
Any ideas on what might be happening?
Additional information: Python interpreter in interactive mode (running it from Terminal) registers both keys just fine. Also, if I try and change the keyboard layout to plain “U.S.”, even IDLE registers the keys; but this tastes more like a workaround and I’d like to hear your opinions.
IDLE uses
Tkinterfrom the Python standard library to supply GUI functionality. Tkinter is an interface to the multi-platformTkgraphical interface, part ofTcl/Tk. Unfortunately, AquaTkon OS X does not currently support all of the standard text processing features on OS X.This particular problem appears to be a variation of a known bug in the Cocoa Aqua Tk. On a normal Apple U.S. keyboard, you use
option U+<vowel>to form a diaeresis (for example,ä). It looks like on the US International keyboard, the'key is used instead of the missingoption u. There is a patch in the most recent ActiveState Tk 8.5 versions (including the one you have installed) that prevents Tk from crashing in this case. You can see how it used to “work” by launching the Apple-supplied IDLE 2.6 included with Mac OS X 10.6 (/usr/bin/idle2.6). Try typing'(with the International keyboard setting) oroption U(with the US keyboard setting) there! The patched version simply ignores this case, rather than crashing.Your best bet is to stick to a
USorUS Extendedkeyboard input method.