How to prevent python IDLE from restarting when running new script
问题 I use Python 3.6.1 IDLE. I'd like to be able to run a sequence of scripts while maintaining the local environment (variables etc.) just as if I had entered all the commands line by line into the shell. However, whenever I execute a script the environment restarts and I lose all the variables from previous executions. Is there anything I can do to prevent this restart? I don't want to have to type things line by line in the shell. This question is similar to Run a module in IDLE (Python 3.4)