[英]Python script to send a notification on Widows
我想要在 repl.it 上運行的 Python 腳本向我的 Windows PC 發送通知。 我怎樣才能做到這一點? 該腳本在 REPL 中 24/7 運行,如果值變為 True 時它在線,我希望它向我的 PC 發送通知。
庫win10toast
具有此功能。 通過pip
安裝后嘗試:
from win10toast import ToastNotifier
toast = ToastNotifier()
toast.show_toast("Hello, World!")
show_toast
有其他參數用於正文、持續時間和圖標。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.