By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,663 Members | 1,477 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,663 IT Pros & Developers. It's quick & easy.

IDLE and msvcrt getch()

P: n/a

Yes, another newbie question. :-)

When I run the following from idle, the msvcrt.getch() function always
returns 255 and it doesn't wait for a key press. It also displays the
key on the screen when it should not.
import msvcrt

while 1:
k = msvcrt.getch()
print k
if k == 'q':
If i run it from a standard console window it works fine. Is this
normal in that it works this way for everyone?

It seems like idle's keyboard routines are getting in the way. Any
way around this?

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.