PY file not opening

i have a PY file that will just open and close. I can’t figure it out. please help.

When you run the program, it opens a window, and when the program finishes, it closes the window. That’s normal.

Start cmd,exe and in cmd run your .py using the py.exe program like this:

py myprog.py