pythonpython-2.7logiccommand-prompt

To pause and resume the program execution in the command prompt


Is there any combination of keys to pause and resume the program execution in the command prompt?

As i have a big program to run, it takes 30 mins to complete the execution, it will be helpful if i can pause and resume to stop in the middle of the program and to resume it when it needed.


Solution

  • If you are in Linux, you could pause the program with Ctrl-Z (and either resume it with fg, or send it to continue its work in background with bg). Considering you use command prompt, I assume you are on Windows, there's no method I know of. You might try to use a new 'cmd' window and minimize it (maybe change its priority from Task Manager)