python3 -i script.py

Category: Python & pip

python3 -i script.py

Run script and drop into interactive REPL after execution

Runs a script and then drops you into the Python interactive prompt (REPL) with all of the script's variables still in scope.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.