First time here? Check out the FAQ!

daoming's profile - activity

2022-05-09 17:59:23 +0000 received badge Popular Question (source)
2022-05-09 14:09:08 +0000 marked best answer msvcrt.hbhit() and msvcrt.getch() in Wing Pro 8 on Windows 10

Hi, I am using Wing Pro 8 on Windows 10. My Python scripts use mscvrt package for hbhit() and getch(). I can get input characters without them being printed on the screen. They work fine in Windows Command window be behave differently in Wing Pro 8. Here is a test script:

import msvcrt
import time
while True:
  while msvcrt.kbhit() == 0:
    time.sleep(0.1)
  print('getting ch')
  c = msvcrt.getch()
  print(f'input: {c}')
  if c==b'e':
    exit()

When running in debug mode, msvcrt.kbhit() always returns zero and msvcrt.getch() never returns. Could it be fixed? Thank you.

2022-05-09 06:34:00 +0000 commented answer msvcrt.hbhit() and msvcrt.getch() in Wing Pro 8 on Windows 10

I love to use it in that way. Thank you.

2022-05-06 14:19:36 +0000 received badge Nice Question (source)
2022-05-06 02:49:36 +0000 received badge Student (source)
2022-05-06 02:49:08 +0000 asked a question msvcrt.hbhit() and msvcrt.getch() in Wing Pro 8 on Windows 10

msvcrt.hbhit() and msvcrt.getch() in Wing Pro 8 on Windows 10 Hi, I am using Wing Pro 8 on Windows 10. My Python scrip