Is there a command line switch to carry out the script specified without terminating the process at the end?
Windows' cmd.exe for example has the /K switch.
As stated on python's manual:
-i switch
When a script is passed as first argument or the -c option is used, enter interactive mode after executing the script.
One option is to add code in your script to drop into an interactive prompt. See this answer.
import code
code.interact(local=locals())
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With