gpt4 book ai didi

python - 如何从 pynotify.Notification 中读取标题、文本和图标名称?

转载 作者:太空宇宙 更新时间:2023-11-03 19:34:09 24 4
gpt4 key购买 nike

如果我有一个 pynotify.Notification 对象,例如:

n = pynotify.Notification('title', 'content', 'icon')

如何读取标题(给出“标题”)、文本正文(给出“内容”)和图标(给出“图标”)?

最佳答案

In [72]: n = pynotify.Notification('title', 'content', 'icon')

In [73]: n.props.summary
Out[74]: 'title'

In [75]: n.props.body
Out[75]: 'content'

In [76]: n.props.icon_name
Out[77]: 'icon'

关于python - 如何从 pynotify.Notification 中读取标题、文本和图标名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4354474/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com