PyCharm: msvcrt.kbhit() and msvcrt.getch() not working? -
i've tried read 1 char console in pycharm (without pressing enter), no avail. functions msvcrt.getch()
stops code, not react key presses (even enter), , msvcrt.kbhit()
returns 0. example code prints nothing:
import msvcrt while 1: if msvcrt.kbhit(): print 'reading' print 'done'
i using windows 7, pycharm 3.4 (the same heppens in idle).
what wrong? there other way read input without enter?
Comments
Post a Comment