[Tkinter-discuss] Button Press Freezes
mkieverpy at tlink.de
mkieverpy at tlink.de
Thu Jun 13 23:15:06 CEST 2013
Quaki Gaffar:
>Here's my situation. I have two tkinter buttons:
>
> Play Button: plays a sound
> Stop Button: to stop the sound during play
>
>Code is as follows:
>
>def Play(self):
> //plays a file with pygame module
>
>def Stop(self):
> //Stop using pygame stop
Greg Ewing:
>No, music.play() is not supposed to block. However, I haven't tried to use
>it outside the context of a pygame app, so I don't know how it behaves if
>there isn't a pygame event loop running.
If my memory serves me well, you cannot mix tkinter and pygame.
Both want their event loop running. I once looked into this
and to my knowledge no one succeeded in embedding one into the other.
And I won't try using just music.play without setting up pygame.
I don't think this would work, but that's just a guess.
Regards,
Matthias Kievernagel
More information about the Tkinter-discuss
mailing list