将 Python 最小化到系统托盘并生成通知? [英] Minimise Python to System Tray and Generate Notifications?

查看:142
本文介绍了将 Python 最小化到系统托盘并生成通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我环顾四周,但找不到任何东西可以接近做我想做的事.

I've had a look around but haven't been able to find anything to get close to doing what I want.

我想让我的 Python 脚本作为最小化的系统托盘应用程序启动,或者能够最小化到系统托盘并能够发出系统托盘通知

I want to make my Python script launch as a minimised system tray application or have the ability to minimise to system tray and also have the ability to make system tray notifications

有人有任何想法/图书馆或例子吗?

Any one have any ideas/libraries or examples?

谢谢- Hyflex

推荐答案

我会先阅读 这个.

那么正如我们这里的朋友在评论中建议的那样,您可以使用 SysTrayIcon.py 在系统托盘中显示您的应用程序.

Then as our friends here suggested in the comments , you could use SysTrayIcon.py to show your application in a system tray .

在显示通知时,您应该检查 Win32 Python Extensions,它在 Lib 中有一个示例\site-packages\win32\demos\win32gui_menu.py .这应该可以帮助您入门.

As of displaying notifications you should check Win32 Python Extensions which has an example in Lib\site-packages\win32\demos\win32gui_menu.py . that should help you get started .

这篇关于将 Python 最小化到系统托盘并生成通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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