I am running some Python code in the console, inside a very long for loop. I would like to pause the execution of the script, and then be able to resume where I left. Is it possible to pause the Python console?
Note: I don’t want to use time.sleep; I want to be able to externally pause the console in the middle of a loop.
If you’re running python in a standard unix console, the usual ctrl-s (pause output, continue with ctrl-q) and ctrl-z (suspend, continue with fg) commands work. If you’re running in a windows command shell, use the Pause button (press any key to continue).