import pygame pygame.init() screen = pygame.display.set_mode([256,128]) screen.fill([0,0,0]) pygame.draw.rect(screen,(255,255,255),(0,0,128,128),0) pygame.display.flip() for j in range(0,256): pygame.draw.line(screen, [j,j,j], [128,128], [j,0], 1) pygame.display.flip() raw_input("Press ENTER to close the graphics window") pygame.quit()