[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] diff betn interactive and non-interactive scripts
Prahlad Vaidyanathan <slime@vsnl.net> writes:
>
> I basically now check the total time of the song, and then put in a
> time.sleep() for that long.
>
> This is *seriously* weird from where I stand. Could someone explain
> why
> this happens ?
Because the music is playing in a seperate thread from the main
thread. If you exit the program the whole process dies including the
music playing thread, so bye music.
There is a function that you can poll to determine if the music is
still playing, I think it is named busy or something like that, check
it out in the documentation, which is very good.
--
Vennlig hilsen
Syver Enstad
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org