Hi all, 

I do not understand completely how to use pyglet's event system. What I 
need to do is to get each event for each frame. In Pygame I can do it in 
the following way:

import sys, pygame
pygame.init()
size = width, height = 320, 240
screen = pygame.display.set_mode(size)
while 1:
for event in pygame.event.get():
print event
if event.type == pygame.QUIT: sys.exit()
screen.fill((0,0,0))
pygame.display.flip()


I accomplish something similar with pyglet, using 
'pyglet.window.event.WindowEventLogger()' but I do not how to acces to the 
information that the WindowEventLogger prints, and it prints the same event 
more than once.

How could I obtain a pyglet version of the pygame code above?

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyglet-users+unsubscr...@googlegroups.com.
To post to this group, send email to pyglet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
import sys, pygame

pygame.init()

size = width, height = 320, 240

screen = pygame.display.set_mode(size)

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

	screen.fill((0,0,0))
	pygame.display.flip()

Reply via email to