|
|
| Hey guys, I have a problem which is driving me NUTS on any interactive python window on windows XP: everytime I try to type either '{' or '[' (on my keyboard layout alt-gr-^ and alt-gr-з) the interactive prompt just beeps at me and types nothing. ( installation = enthought python 2.3 and 2.4-beta1, same problem ) I tried figuring it out myself (well, googling) but it's one of those undefinable things that makes it very hard to search for it. |
| But no problems if you C&P those characters, correct? |
| Correct Copy-pasting '[' was getting a bit annoying after a while ;-) |
| You could change your keyboard layout to US-english, but that would probably be equally annoying |
| And if you use Alt+123/Alt+091? |
| Doesn't let me Beeps at me every time I type a number (holding alt) Koplaf, yeah, my kb is belgian (french) layout, so I don't want to swap all my 'a' and 'z' chars ;-) Ldlework, correct Ikopar, you seemed to have heard this problem before? |
| Kopilman, Nope. But my first thought for a workaround was to redefine the keys in the registry. You get this in IDLE too? Or, only the DOS-box interactive? What about when running a Python app? |
| DOS-box interactive only |
| Use IDLE. |
| That's rather a workaround than a fix... I personally don't really like IDLE... :-S |
| You prefer the DOS-box over IDLE? Why? |
| { and [ are obvious sending control signals/characters to the prompt. I have no idea why, but googling "square bracket dos control signal" or similar might tell you. |
| Kopilman, http://www.microsoft.com/globaldev/tools/msklc.mspx ? |
| My keyboard / regular "cmd" prompts / cygwin work just fine... it's *only* when I run interactive python... |
| Kopilman, Also, what do you get by running this: Python -Ec "import sys; print sys.stdin.encoding" & mode con cp |
| Ikopar, this works, output in pastebin => python -Ec "import sys; print sys.stdin.encoding" & mode con cp this "works" but doesn't display anything, si... => import msvcrt; print msvcrt.getch() |
| At the prompt, type ‘command’; at the new prompt, type ‘python -’ But getch() works for the other keys, yes? |
| look at this: >>> msvcrt.getch() '[' >>> Hadn't understood what you were telling me, sorry So, getch() works just fine for the characters that give me trouble otherwise |
| Try: ‘python con’ |
| That works I.e. [ works This kinda helps me, but I'd love to know wtf is going wrong :-) |
| IDLE is a lot nicer. And IDLE in 2.5 has method-completion. |
| Perhaps I should look into using it more again |
| Or one of the other interactives/editors, e.g., Leo: http://webpages.charter.net/edreamleo/front.html |