pause/resume a python script in middle

后端 未结 9 1488
再見小時候
再見小時候 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:22

    If you're launching your python script from the windows command window, you can use msvcrt.kbhit() as a non-blocking key press check as implemented here: http://code.activestate.com/recipes/197140-key-press-detection-for-windows-text-only-console-/

提交回复
热议问题