import pynotify
# Only Text Notification
pynotify.init('Basic')
pynotify.Notification("Title", "simple text").show()
# Lets try with an image
pynotify.init('Image')
## Use absolute Path of the photo
pynotify.Notification("Title", "My Photo here!!", "/home/nafis/Pictures/me.png").show()
# Try Markup
pynotify.init("markup") ## all smallerCase "markup"
# but in parameter, first letter capital
pynotify.Notification("Markup",
'''
<b>bold</b>, <i>italic</i>, <u>underline</u>
and even <a href="http://google.com">links</a> are supported!
'''
).show()
这是一个Ubuntu特有的东西,叫做NotifyOSD。这里有一些编程的例子here。在
python中的快速和脏代码
您也可以从shell使用它(我使用lubuntu,它在这里工作)
^{pr2}$相关问题 更多 >
编程相关推荐