- Code: Select all
key = "e"
# if msvcrt.kbhit():
# key = msvcrt.getch()
The above program prints a e b as it should. If I uncomment getch() it does not wait for a keypress and prints a y b with 2 dots over the y.
If I uncomment the kbhit() the program does nothing because the kbhit() always returns false. Yes, I am hitting keys.
I am running on a Macbook Pro, vmware fusion, windows XP. The equivalent program compiled on Borland C works just fine.
Any Python hints would be appreciated. Thanks, Mike