1while not done:
2 for e in event.get():
3 if e.type == KEYDOWN:
4 keys = key.get_pressed()
5 if e.type == QUIT or keys[K_ESCAPE]:
6 done = True
7 if keys[K_DOWN]:
8 print "DOWN"
9
1while not done:
2 for e in event.get():
3 if e.type == KEYDOWN:
4 keys = key.get_pressed()
5 if e.type == QUIT or keys[K_ESCAPE]:
6 done = True
7 while keys[K_DOWN]:
8 print "DOWN"
9 event.get()
10 keys = key.get_pressed()
11