NSt*_*tal 3 python ubuntu user-interface gnome popup
http://tinypic.com/r/5dv7kj/7 如何在图片中显示消息(右上角)?
我是linux新手,现在要使用pygtk使客户端应用程序显示/弹出一些随机提示/ mems.
使用传统的winodw是可以的,但这个对我来说更友好.我尝试过扫描pygtk指南,但仍然错过了解决方案.其他
有没有任何机构可以给我一些提示?任何python GUI库也可以.
python中的快速和脏代码
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()
Run Code Online (Sandbox Code Playgroud)
你也可以从 shell 使用它(我使用 lubuntu,它在这里工作。)
#!/bin/bash
### try it in terminal
notify-send -t 900 "Title" "Message"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3014 次 |
| 最近记录: |