""" Run the following command in the shell before executing this script export SDL_WINDOWID=`xwininfo -root|grep "id:"|sed 's/^.*id: //'|sed 's/ (.*$//'` """ import pygame import sys import random import time pygame.init() window = pygame.display.set_mode((1280, 1024)) screen = pygame.display.get_surface() while 1: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit(0) x = random.choice(range(640)) y = random.choice(range(480)) radius = random.choice(range(100)) col_r = random.choice(range(255)) col_g = random.choice(range(255)) col_b = random.choice(range(255)) time.sleep(.01) rect = pygame.draw.circle(screen, (col_r, col_g, col_b), (x,y), radius) pygame.display.update(rect)