On 30/09/10 04:23 PM, Kris Schnee wrote:
On 2010.9.30 12:01 PM, Massimo Di Stefano wrote:
I tried the following code in a standard python shell :
from pygame.locals import *
import pygame
pygame.init()
Leopard libedit detected.
(6, 0)
for event in pygame.event.get():
... if event.type == QUIT:
... running = False
...
pygame.event.pump()
pygame.quit()
Different note: isn't pygame.event.pump redundant here, since you're
already clearing the latest events by calling pygame.event.get()?
Probably. I just suggested pygame.event.pump as an alternative to an
event loop. But pygame.init() does not open a window, so no event loop
should be needed.
Lenard Lindstrom