I know this has been asked couple of times, but I haven't found a good solution.
I wish to run my python scripts using python.exe
with possibly a command line argument or such to make the python script pause after the execution.
Ideal solution would be something like python myscript.py -pause
and now it'd say "Press any key to continue ..." after the execution.
As far as I know this is not possible, but I'm looking for a similar solution.
The solutions I've found so far are:
- Running my script with cmd line:
cmd /K python myscript.py
but it leaves the cmd window open stupidly, I now need to write exit to get back to my text editor. - Manually adding
input("Press any key to continue ...")
to my python scripts, but I often need to open like 25 different scripts within an hour, and it feels stupid to write it for each one of them, and then remove it once I'm done.
Is there a better solution, like automatically calling input()
after script's been executed?