import pygame, sys # | from pygame.locals import * # }-- Imports pygame.init() #initiation of the window DISPLAYSURF = pygame.display.set_mode((400, 300)) # resolution pygame.display.set_caption('Hello world!') # window name while True: # game loop for event in pygame.event.get(): if event.type == QUIT: # | pygame.quit() # }-- close windowed application code sys.exit() # | pygame.display.update() # Updating the application