import os # Everything stops when played os.system("afplay sound.wav") # Everything continues when played os.system("afplay sound.wav&")