Python Launcher not running programs

I have a new MacBook Air with the M1 chip. I downloaded Python (2.7, 3.8, 3.9) and wrote the simplest Python program possible: print (‘Hello World’). It runs fine under IDLE. But when I double-click on this script, python laucher opens, but it does NOT open a terminal window in which the program should run. I get some microsecond flash on the screen, and then nothing. By the way, Python Launcher shows its preferences, which are the factory settings with Run in Terminal Window checked.

If anyone knows how to fix this, please respond.

Perhaps rather than “doesn’t open”, it opens and then closes so fast that it’s hard to see. With nothing after the print, the program exits, and I suspect the window closes at that point.

What happens if you add a pause after the final line (like a sleep or an input())?

Dear BowlOfRed,

I tried your idea. I didn’t see anything flash on the screen, but NO
terminal window opened.

By the way, I have a 10-year-old iMac on which I have been writing
python programs for years. It has never given me this problem. And even
when the program was just to print Hello World, it opened the window and
didn’t close it when the program finished. In fact, I have never seen
any terminal windows close and have always had to quit them to get rid
of them.

I still think that python launcher is not really opening a terminal
window even though the preferences call for that.

Many thanks for your suggestion. If you have more, please send them.

Kevin

I’m back again.
I now have a new iMac 24" with Ventura at the latest level. I have downloaded Python 2.7.18, the last release of Python 2. The preferences for Launcher are EXACTLY the same as on my old iMac 27", but I have the same problem I had on my MacBook Air, namely, that double-clicking on an application doesn’t start it. I see a window flash by on the screen, but that is it. I really need to use Python 2 because that’s what all my programs are written it. I really want to be able to use these programs on my new iMac. I don’t want to have to start them ALL from inside IDLE (what a waste of time). What is the answer? HELP!