Prosperp
Prosperp

Reputation: 1

Spyder 5.1 - problem with run script button in console

Normally in left corner of IPython console is button to "run script/stop the current command" but in my program it stuck in "stop" form. I can run scripts with F5 or from the toolbar. While the script is running, the script button in console works, and the script can be stopped with it, but the button doesn't change into "run script" afterwards.

I have absolutely no idea what is responsible. I tried to restart Spyder, restart computer, even reinstall Spyder and reset it to factory defaults. Nothing helped.

Upvotes: 0

Views: 651

Answers (1)

jonsca
jonsca

Reputation: 10381

This is by design in the IDE. Since you could have multiple files running within the same IDE session, the terminal wouldn't know which one you wanted to run at any given point. That's why the run button/shortcut are specific to one file or selection and are on the top bar. The console can only stop the execution of the currently running statement.

If you want to repeat the statement/file you just ran, type %rerun or %rerun N where N is line number of the command you want to rerun. Other options are here: https://ipython.readthedocs.io/en/stable/interactive/magics.html

Upvotes: 0

Related Questions