forked from souravjain540/Basic-Python-Programs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotification.py
35 lines (29 loc) · 872 Bytes
/
notification.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import time
from plyer import notification
print("Enter the Remainder Message:")
msg = input()
print("Enter the mode of time seconds or minutes or hours")
mode = input()
print("Enter the time left for remainder or time after which remainder should show:")
t = int(input())
if mode == "seconds":
time.sleep(t)
notification.notify(
title = "REMAINDER!!!",
message = msg,
timeout = 10
)
elif mode == "minutes":
time.sleep(t*60)
notification.notify(
title = "REMAINDER!!!",
message = msg,
timeout = 10
)
elif mode == "hours":
time.sleep(t*3600)
notification.notify(
title = "REMAINDER!!!",
message = msg,
timeout = 10
)