david4dev
david4dev

Reputation: 4914

How can I read the title, text and icon name from a pynotify.Notification?

If I have a pynotify.Notification object like:

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

How can I read the title (to give 'title'), the text body (to give 'content') and the icon (to give 'icon')?

Upvotes: 1

Views: 242

Answers (1)

unutbu
unutbu

Reputation: 879361

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'

Upvotes: 1

Related Questions