First time here? Check out the FAQ!

daoming's profile - activity

2022-05-09 12:59:23 -0500 received badge Popular Question (source)
2022-05-09 09:09:08 -0500 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 01:34:00 -0500 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 09:19:36 -0500 received badge Nice Question (source)
2022-05-05 21:49:36 -0500 received badge Student (source)
2022-05-05 21:49:08 -0500 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 script