hidden input?

Bjorn Pettersen bjorn at roguewave.com
Sat Jul 22 18:26:37 EDT 2000


Ben Wolfson wrote:
> 
> Is there a way to get input not echoed to the screen in Python, as in the
> non-standard functions kbhit() and getch() in C and C++?

import msvcrt

while not msvcrt.kbhit():
   #do something
c = msvcrt.getch()

assuming you're on windows, of course...

-- bjorn




More information about the Python-list mailing list