Last active
September 14, 2023 22:03
-
-
Save robinkaty/31ac3e72fc9e8aa8ee66526d7ccebde9 to your computer and use it in GitHub Desktop.
portable_alert_sounds.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import platform | |
def beephappy(): | |
if platform.system() == "Windows": | |
import winsound | |
winsound.Beep(1998, 500) | |
elif platform.system() == "Darwin": | |
import os | |
os.system("afplay /System/Library/Sounds/Tink.aiff") | |
elif platform.system() == "Linux": | |
import os | |
os.system("beep") | |
def beepsad(): | |
if platform.system() == "Windows": | |
import winsound | |
winsound.Beep(1000, 200) | |
winsound.Beep(500, 200) | |
winsound.Beep(1000, 200) | |
winsound.Beep(500, 200) | |
winsound.Beep(1000, 200) | |
elif platform.system() == "Darwin": | |
import os | |
os.system("afplay /System/Library/Sounds/Basso.aiff") | |
elif platform.system() == "Linux": | |
import os | |
os.system("beep") | |
os.system("beep") | |
os.system("beep") | |
if __name__ == "__main__": | |
# beephappy() | |
beepsad() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment