You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ff/notification.py

20 lines
583 B
Python

from plyer import notification #for getting notification on your PC
import sys
from playsound import playsound #pip install playsound==1.2.2
from util import find_data_file
relative_path = (sys.path[0])
sound = find_data_file('music.mp3')
def send_notification(msg="Test notification"):
notification.notify(
title = "IP Pigeon",
message = msg,
app_name = "IPPigeon",
app_icon = find_data_file("icon.ico"),
timeout = 5 #number of seconds message is displayed
)
playsound(sound)
if __name__ == '__main__':
send_notification()