Python 发送 WIN 10 通知消息
【摘要】
文章目录
Python 发送 WIN 10 通知消息1、安装库2、编写代码
Python 发送 WIN 10 通知消息
1、安装库
pip install win1...
Python 发送 WIN 10 通知消息
1、安装库
pip install win10toast
2、编写代码
from win10toast import ToastNotifier
import _thread
from time import sleep
"""
win10toast 的库底层为win32api、win32con和win32gui
"""
toaster = ToastNotifier()
def show_toast():
toaster.show_toast("通知标题",
"通知内容",
icon_path=None,
duration=5,
threaded=True)
def send():
_thread.start_new_thread(show_toast, ())
sleep(0.1)
if __name__ == '__main__':
send()
运行即可
文章来源: wretchant.blog.csdn.net,作者:简简单单OnlineZuozuo,版权归原作者所有,如需转载,请联系作者。
原文链接:wretchant.blog.csdn.net/article/details/122167209
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)