import pygame, sys from pygame.locals import * pygame.init() DISPLAYSURF = pygame.display.set_mode((400,300)) mySurface = pygame.surface((50, 50)) mySurface.fill((0,255,0)) while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.display.update()