Pygame, how to show window without loop? no loop=popupand close...

defn noob circularfunc at yahoo.se
Fri Jun 27 22:17:35 EDT 2008


Im using PyGame to draw images of graphs and trees. Howver right now i
am looping using:

while 1:
    for event in pygame.event.get():
        if event.type == pygame.QUIT: sys.exit()

    screen.fill(screencolor)

    pygame.draw.circle(screen, linecolor, (500, 20), 12, 0)

    draw((500, 20), 3)

    pygame.display.flip()


if i do

screen.fill(screencolor)

pygame.draw.circle(screen, linecolor, (500, 20), 12, 0)

draw((500, 20), 3)

pygame.display.flip()

it just pops up and closes. how can i make it stay until i close it
without using a loop?



More information about the Python-list mailing list