Python 在linux桌面上显示实时记分卡
我已经编写了一个python脚本,它显示了所有实时比赛的分数。我希望在我的桌面上而不是在终端上显示分数。我还希望每5分钟左右更新一次记分卡。 以下是python脚本:Python 在linux桌面上显示实时记分卡,python,xml,linux,elementtree,Python,Xml,Linux,Elementtree,我已经编写了一个python脚本,它显示了所有实时比赛的分数。我希望在我的桌面上而不是在终端上显示分数。我还希望每5分钟左右更新一次记分卡。 以下是python脚本: import xml.etree.cElementTree as ET import requests tree = ET.fromstring(requests.get('http://www.cricbuzz.com/livecricketscore/home-score-matches.xml').text) for ele
import xml.etree.cElementTree as ET
import requests
tree = ET.fromstring(requests.get('http://www.cricbuzz.com/livecricketscore/home-score-matches.xml').text)
for elem in tree.iter('match'):
state = elem.find('state').text
footer = elem.find('footer').text
header = elem.find('header').text
print state,header,footer
如何实现上述功能?您需要为此构建GUI。有很多图书馆应该会有所帮助。举几个例子-,等等。你不需要像Vikas Neha建议的那样使用任何花哨的GUI东西。您所需要的只是pynotify库
pynotify.init("TEST")
notice=pynotify.Notification("Your Score card",string_to_show)
notice.show()
这将在屏幕上的气泡通知上显示您的消息