我正在尝试创建一个 pystray 菜单分隔符,但我很难做到这一点。我在这里搜索了 SO 及其文档,我发现这非常令人困惑且无益,我什至尝试阅读该Menu课程:
class Menu(object):
"""A description of a menu.
A menu description is immutable.
It is created with a sequence of :class:`Menu.Item` instances, or a single
callable which must return a generator for the menu items.
First, non-visible menu items are removed from the list, then any instances
of :attr:`SEPARATOR` occurring at the head or tail of the item list are
removed, and any consecutive separators are reduced to one.
"""
#: A …Run Code Online (Sandbox Code Playgroud)