#Place this at the end of your script, so that it will wait for an input, keeping the window open input("")