If the game runs normally without IDLE, then, to run it from IDLE, add
pygame.quit() at the end of the script:
if __name__ == "__main__":
MainWindow = PyManMain()
MainWindow.MainLoop()
pygame.quit()
... and just before the sys.exit():
def MainLoop(self):
"""This is the Ma
On May 1, 10:55 am, globalrev <[EMAIL PROTECTED]> wrote:
> im doing this
> :http://www.learningpython.com/2006/03/12/creating-a-game-in-python-us...
>
> and when closing the program the window stays up and doesnt respond. i
> tried adding this:http://www.pygame.org/wiki/FrequentlyAskedQuestions
>
another program that has the same problem:
import sys, pygame
pygame.init()
size = width, height = 320, 240
speed = [2, 2]
black = 0, 0, 0
screen = pygame.display.set_mode(size)
ball = pygame.image.load("snake.png")
ballrect = ball.get_rect()
while 1:
for event in pygame.event.get():
im doing this :
http://www.learningpython.com/2006/03/12/creating-a-game-in-python-using-pygame-part-one/
and when closing the program the window stays up and doesnt respond. i
tried adding this:
http://www.pygame.org/wiki/FrequentlyAskedQuestions
bu it doesnt work, or maybe im doing it wrong.
h