I am new to Python and Pygame, and right now I'm trying to open a test window with some simple code :
import pygame, sys
from pygame.locals import *
pygame.init()
DISPLAYSURF = pygame.display.set_mode((400, 300))
pygame.display.set_caption('Hello World!')
while True: # main game loop
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
When I try to run it, I get the welcome message in terminal ("pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html"), and the python launcher starts, but it never opens. The icon simply bounces in the dock for a while, and then says Application Not Responding.
Python Launcher initialized normally with other code that doesn't use pygame, and python, pip and pygame are all up to date. I have also tried to run other pieces of code from tutorials, but everything gets the same result. I installed the new macOS Catalina today, if that makes a difference.
Thanks for your help!