为什么这个简单的 python toast 通知不起作用?

use*_*486 6 python toast python-3.x windows-10

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

我正在使用这个 python 库。

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

我运行了下面的代码;

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

我得到的只是一个出现在右下角的图标。我没有看到任何消息弹出。有哪些可能出错的事情?

Windows 10 中是否有一些配置设置禁用了 python toast 通知?

下面的屏幕截图显示了运行 python 代码时出现的底行的小 python 图标。我没有看到任何消息,例如Hello World!!!","Python is awsm by default!出现。当我的鼠标指针悬停在 python 图标上时,我看到tooltip出现了这个词。

在此处输入图片说明

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

在此处输入图片说明

use*_*486 9

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

win10toast正确设置操作中心设置后,python 库工作正常。