我正在使用Win10Toaster库。我正在使用这个示例代码,第一次工作时,但现在不显示任何通知。控制台上没有错误。
from win10toast import ToastNotifier
if __name__ == "__main__":
# Example
toaster = ToastNotifier()
toaster.show_toast(
"Hello World!!!",
"Python is 10 seconds awsm!",
duration=10)
toaster.show_toast(
"Example two",
"Once you start coding in Python you'll hate other languages")
这是我在运行的命令:
>>> from win10toast import ToastNotifier
>>> toaster = ToastNotifier()
>>> toaster.show_toast("Test title", "Test message", duration=10)
True
不显示通知,只有工具栏上的图标
编辑
我在另一台使用WindowsServer2012的计算机上测试了代码,它显示通知。