Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8df3d7a

Browse files
committed
Minor enhancement for beep
1 parent a905b8d commit 8df3d7a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

extra/beep/beep.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ def _win_wav_play(filename):
4545
winsound.PlaySound(filename, winsound.SND_FILENAME)
4646

4747
def _linux_wav_play(filename):
48+
for _ in ("aplay", "paplay", "play"):
49+
if not os.system("%s '%s' 2>/dev/null" % (_, filename)):
50+
return
51+
4852
import ctypes
4953

5054
PA_STREAM_PLAYBACK = 1

0 commit comments

Comments
 (0)