for event in pygame.event.get(): #... your code
import pygame pygame.init() screen = pygame.display.set_mode((500,300)) thing = 0 while thing < 100000000: thing += 1 event = pygame.event.get() print (event) pygame.quit()