Python program wont shut down!

Discussion in 'Programming' started by whiteblue1942, Jun 10, 2009.

  1. #1
    Somebody help me. Whenever i close my python program, it wont exit! can someone tell me what is wrong?

    
    bif="bg.jpg"
    mif="ball.png"
    
    import pygame
    from pygame.locals import *
    from sys import exit
    
    pygame.init()
    
    screen=pygame.display.set_mode((640,360),0,32)
    
    background=pygame.image.load(bif).convert()
    mouse_c=pygame.image.load(mif).convert_alpha()
    
    while True:
        for event in pygame.event.get():
            if event.type == QUIT:
                exit()
    
        screen.blit(background,(0,0))
    
        x,y = pygame.mouse.get_pos()
        x -= mouse_c.get_width()/2
        y -= mouse_c.get_height()/2
    
        screen.blit(mouse_c,(x,y))
    
        pygame.display.update()
    
    
    Code (markup):
     
    whiteblue1942, Jun 10, 2009 IP
  2. ronin1770

    ronin1770 Well-Known Member

    Messages:
    142
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #2
    how are you exiting it????

    hard killl???
     
    ronin1770, Jun 12, 2009 IP