title: In pygame (or even in python in general), how would I create a loop that keeps executing while a sound is playing?
body: <p>In pygame is there a way to tell if a sound has finished playing? I read the <code>set_endevent</code> and <code>get_endevent</code> documentation but I can't make sense of it or find an example. </p>
  
  <p>I'm trying to specifically do the following:</p>
  
  <ol>
  <li>play a sound</li>
  <li>While the sound is playing keep iterating on a loop</li>
  <li>When the sound has finished playing, move on.</li>
  </ol>
  
  <p>I did check the other questions that were asked - didnt find anything specifically targeting python / pygame.</p>
  
  <p>Thanks!</p>