簡體   English   中英

Python 腳本在寡婦上發送通知

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM