Pause in Python

后端 未结 13 1272
臣服心动
臣服心动 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:11

    The best option: os.system('pause') <-- this will actually display a message saying 'press any key to continue' whereas adding just raw_input('') will print no message, just the cursor will be available.

    not related to answer:

    os.system("some cmd command") is a really great command as the command can execute any batch file/cmd commands.

提交回复
热议问题