How can I make pynotify display line breaks and HTML in the notifications?
Here is what I got:开发者_如何学JAVA
>>> import pynotify
>>> n = pynotify.Notification ("This is a test.\n\nAnd this too!",
"","notification-message-im")
>>> n.show()
Contrary to what is expected, there is no line-break between the two sentences. (At least not on Ubuntu 10.04)
Also, is there a way to include simple HTML in the notifications, like <b>
, <br>
, or <i>
?
You can use '\n' in message body but not in summary.
>>> n = pynotify.Notification("summary", "body\n next line", "dialog-warning")
>>> n.show()
精彩评论