Some more DREI stuff

This commit is contained in:
Miroslav Stampar
2019-03-28 16:04:38 +01:00
parent 4b020c4257
commit 9b72545d09
76 changed files with 95 additions and 258 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python
"""
beep.py - Make a beep sound
@@ -8,7 +8,6 @@ See the file 'LICENSE' for copying permission
"""
import os
import subprocess
import sys
import wave
@@ -16,11 +15,11 @@ BEEP_WAV_FILENAME = os.path.join(os.path.dirname(__file__), "beep.wav")
def beep():
try:
if subprocess.mswindows:
if sys.platform == "nt":
_win_wav_play(BEEP_WAV_FILENAME)
elif sys.platform == "darwin":
_mac_beep()
elif sys.platform == "linux2":
elif sys.platform.startswith("linux"):
_linux_wav_play(BEEP_WAV_FILENAME)
else:
_speaker_beep()