python实现getch()效果
在windows上比较简单:
import msvcrt
ch = msvcrt.getch()
其他平台,可以安装getch模块
pip install getch
然后
import getch
# ...
char = getch.getch() # User input, but not displayed on the screen
# or
char = getch.getche() # also displayed on the screen