pause/resume a python script in middle

后端 未结 9 1435
再見小時候
再見小時候 2020-12-28 16:38

Can I have a running python script(under Windows)being paused in the middle by user , and resume again when user decides ?

There is a main manager program which gen

9条回答
  •  被撕碎了的回忆
    2020-12-28 17:20

    I don't understand very well your approach but every time a user needs to press a enter to continue the script you should use:

    input() #for python 3k
    raw_input() #for python 2k
    

    without assigning the receiving answer to a variable.

提交回复
热议问题