Pause in Python

后端 未结 13 1255
臣服心动
臣服心动 2020-12-24 10:59

I am running command-line Python scripts from the Windows taskbar by having a shortcut pointing to the Python interpreter with the actual script as a parameter.

Afte

13条回答
  •  天命终不由人
    2020-12-24 11:28

    Getting python to read a single character from the terminal in an unbuffered manner is a little bit tricky, but here's a recipe that'll do it:

    Recipe 134892: getch()-like unbuffered character reading from stdin on both Windows and Unix (Python)

提交回复
热议问题