[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] refresh problem
Luke Paireepinart wrote:
In single process mode it will lock up the editor, but frees it when
the window Pygame window closes.
But if you have an error in your code, the window won't exit, and the
editor won't unfreeze. That's the problem he's having.
-Luke
This works:
import pygame
from pygame.locals import *
pygame.init()
try:
screen = pygame.display.set_mode( (640,480) )
done = False
while not done:
pygame.display.flip()
for event in pygame.event.get():
if event.type == QUIT:
raise Exception("")
finally:
pygame.quit()
But yes, if the program gets caught in an infinite loop I expect it is
hard to kill.
--
Lenard Lindstrom
<len-l@xxxxxxxxx>