I want a Python script running on repl.it to send a notification to my Windows PC. How can I achieve this? The script runs 24/7 in REPL, I want it to send a notification to my PC if it's online when a value becomes True.
1 Answer
The library win10toast has this feature. After installing through pip try:
from win10toast import ToastNotifier
toast = ToastNotifier()
toast.show_toast("Hello, World!")
show_toast has other args for body, duration and icon.
3 Comments
NitroX
But how do I make it so that when a value in my Python script running in a virtual server turns true, it sends a notification on my Windows laptop that is online. The script is not running on my local system.
josh-stackexchange
You could use an email library and have the repl script send an email upon completion. There are quite a few existing well-documented email packages.
NitroX
Fair. I was looking for a Windows Notification service but thanks regardless.