Is there a way in Spyder (Spyder 5.5.0) to pause the execution of a Python script (Python 3.12), leave the laptop in sleep mode, and then resume execution later without debugging the code? I want to run a simulation using ‘Run file (F5)’ Run file (F5) in Spyder in Spyder, pause it during my commute from the office to home, and continue running it when I reopen the laptop at home.
In MATLAB, there’s a similar functionality with Run all sections (F5)
, then Pause the currently executing code and enter debug mode (Ctrl + F5)
and then Continue Running (F5)
, but I’m unsure if it’s available in Spyder for Python scripts.
Thank you
I would like to:
- Press
Run file (F5)
in Spyder (Matlab correspondentRun all sections (F5)
) - Press something to pause the execution of the Python script (Matlab correspondent
Pause the currently executing code and enter debug mode (Ctrl + F5)
) - Press something to continue the execution of the Python script (Matlab correspondent
Continue Running (F5)
)
I have tried to press Run file (F5)
in Spyder and then press Stop debugging (Ctrl+Shift+F12)
and then in the IPython Console write In [2]: !continue
. This does not work as it tells me ‘continue’ is not recognized as an internal or external command, operable program or batch file.
I have also tried to press “Ctrl+F5” and then press Stop debugging (Ctrl+Shift+F12)
and then in the IPython Console write In [2]: !continue
. This does not work as well for the same reason.
Ilaria Fichera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.