Minor enhancement for beep

This commit is contained in:
Miroslav Stampar 2015-07-24 12:11:12 +02:00
parent a905b8d8f5
commit 8df3d7a6fa

View File

@ -45,6 +45,10 @@ def _win_wav_play(filename):
winsound.PlaySound(filename, winsound.SND_FILENAME)
def _linux_wav_play(filename):
for _ in ("aplay", "paplay", "play"):
if not os.system("%s '%s' 2>/dev/null" % (_, filename)):
return
import ctypes
PA_STREAM_PLAYBACK = 1