将python脚本放入系统托盘的最简单方法是什么(Windows) [英] What's the simplest way to put a python script into the system tray (Windows)
本文介绍了将python脚本放入系统托盘的最简单方法是什么(Windows)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
将python脚本放入系统托盘的最简单方法是什么?
What's the simplest way to put a python script into the system tray?
我的目标平台是 Windows.我不想看到cmd.exe"窗口.
My target platform is Windows. I don't want to see the 'cmd.exe' window.
推荐答案
其实就是两个问题:
- 可以使用 Win32 API 添加托盘图标.示例:SysTrayIcon.py
- 隐藏
cmd.exe
窗口就像使用pythonw.exe
而不是python.exe
来运行脚本一样简单.立>
- Adding a tray icon can be done with Win32 API. Example: SysTrayIcon.py
- Hiding the
cmd.exe
window is as easy as usingpythonw.exe
instead ofpython.exe
to run your scripts.
这篇关于将python脚本放入系统托盘的最简单方法是什么(Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文