为什么这个简单的 python toast 通知不起作用? [英] Why is this simple python toast notification not working?

查看:40
本文介绍了为什么这个简单的 python toast 通知不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Windows10 机器上使用 python v3.6 创建一个简单的 toast 通知.

我正在使用这个 python 库.

这是我在 Windows 10 上的通知设置.

解决方案

我发现了我的问题的解决方案.Toast 通知已被 Windows 10 操作中心抑制.在右下角,单击操作中心图标.对于我的 PC,安静时间"设置已打开.禁用安静时间"后,可以出现吐司通知.

在正确设置 Action Center 设置后,python 库 win10toast 工作得很好.

I would like to create a simple toast notification using python v3.6 on Windows10 machine.

I am using this python library.

https://github.com/jithurjacob/Windows-10-Toast-Notifications/

I ran the code below;

 from win10toast import ToastNotifier
    toaster = ToastNotifier()
    toaster.show_toast("Hello World!!!",
                 "Python is awsm by default!")

All I get is an icon appearing at the bottom right. I don't see any message popping out. What are some possible things that can go wrong?

Are there some configuration settings in Windows 10 that disabled the python toast notification?

The screenshot below shows the tiny python icon at the bottom row that appears when I run the python code. I don't see any message such as Hello World!!!","Python is awsm by default! appearing. When my mouse pointer hover over the python icon, I see the word tooltip appearing.

Here is my notification settings on Windows 10.

解决方案

I discovered the solution to my question. The toast notifications have been suppressed by Windows 10 Action Center. At the bottom right corner, click the Action Center icon. For my PC, the "Quiet Hours" setting was turned on. After I disable "Quiet Hours", toast notifications can appear.

The python library win10toast works perfectly fine after Action Center settings are correctly set.

这篇关于为什么这个简单的 python toast 通知不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆