import time from mpd import MPDClient client = MPDClient() client.timeout = 60 client.connect("localhost", 6600) song = client.status()["song"] client.stop() time.sleep(1) client.play(song)