when exiting the pygame it always crash

i am try to play a movie using the pygame module

but it always crashes on idle and blender when exiting here’s my script

import pygame
import sys
from pygame.movie import *
from pygame.surface import *

try :
    playing = playing
except :
    playing = 1
if __name__ == '__main__':
    m = Movie('C:\Bl.mpeg')
    s = pygame.display.set_mode(m.get_size())
    while playing == 1:
        event = pygame.event.wait()
        if event.type == KEYDOWN :
            playing = 0

how can i fix the crash

ok maybe my question is too dumb … lets change the question

have anybody used the pygame to play a movie on blender in real time

  1. how is it done ?

  2. if there are any example i will be thankful


Have you seen this?



Thz for the replay

yes i have seen that tut from the pygame web actually i downloaded all the tut from the web

but my problem is i can’t get any input from the user when the pygame movie player is running

so how can the movie be canceled when run ??? …for now i set a timer and when it is time the movie will be canceled

I don’t know anything about Python so I can’t help but maybe you could ask at one of the links on this page: