Forums

Run script several times without relaunching console

Hi, I am teaching a course using pythonanywhere where students are having to run simply scripts repeatedly. Each time a file is "run", even in the same webpage window, the console shuts down and the interpreter relaunches, which takes a lot of time in and of itself. Is there a way to keep the console open and running when working with files?

Thanks!

The easiest way is to keep a bash console open in another browser tab -- then you can just run (for example)

python3.6 myscript.py

...to re-run it.