title: How can I make a single Button play music, pause music and unpause music in Python using tkinter and pygame?
body: <p>I've only been able to get the program to play music when the button is pushed. Everything I've tried to pause or stop the music has ended in failure. I feel like I should be using an if statement to pause the music if it's currently playing or to unpause it if it's not but I need to understand the proper way to write that. Would this be the correct approach?  I really want to be able to start, pause and unpause the music from a single button but I'm struggling to figure out how to go about coding that. Here is my code to play the music.</p>
  <pre><code> def Play_music():
       pygame.mixer.music.load('tavernsound.mp3')
       pygame.mixer.music.play()
  </code></pre>
  <p>and here is the code for the button:</p>
  <pre><code>btn11=Button(labelframe, text='Ambiance', width=14, bg='red', fg='black', command=Play_music)
  btn11.pack(side=LEFT)
  </code></pre>