开发者

How to get pynotify to display line breaks and HTML?

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()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜