Shard Shard - 1 month ago 9
Python Question

Stop python from closing on error

In python when running scripts is there a way to stop the console window from closing after spitting out the traceback?

Answer

If you doing this on a Windows OS, you can prefix the target of your shortcut with:

C:\WINDOWS\system32\cmd.exe /K <command>

This will prevent the window from closing when the command exits.

Comments