import pygame import sys pygame.init() screen = pygame.display.set_mode((400, 300)) surface = pygame.surface((50, 50)) surface.fill((0,255,0)) while True: events = pygame.event.get() for event in events: if event.type == pygame.QUIT: pygame.quit() sys.exit() screen.blit()