有没有办法从用户输入读取一个单个字符?例如,他们在终端按一个键然后返回(有点像getch()).我知道Windows中有一个功能,但我想要一些跨平台的功能.
getch()
python input
我有一个Bash shell脚本,我想暂停执行,直到用户按下一个键.在DOS中,使用"pause"命令可以轻松完成.我可以在脚本中使用Linux等价物吗?
linux bash shell
我如何在Python中"点击任何键"(或获取菜单选项)?
有没有一种可移植的方法来使用标准库?
python
python ×2
bash ×1
input ×1
linux ×1
shell ×1