pause/resume a python script in middle

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

    You can use Pdb module in python. Eventhough it's a debugger, in your case it helps you pass and continue wherever you have a breakpoint in the code.

    Also when you resume you can get a glimpse of where it is paused and what are the values of the variables etc. Which will be very helpful.

    python debugger - pdb

提交回复
热议问题