Using msvcrt.getch() in Eclipse / PyDev
问题 I wanted to use msvcrt.getch() in Eclipse with PyDev to read a signe char but I found out that it just don't work (but It works in the Windows console). Any idea what to do ? 回答1: Maybe use sys.stdin.read when run in PyDev? like sys.stdin.read(1) read 1 line from input...For use in Windows console and in PyDev make same selection based on os and run variants(using sys.stdin.isatty ). For example next code read timelimited user input. But when run in Windows console if program's standard input