graph.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:my-weather-indicator 作者: atareao 项目源码 文件源码
def title_changed(self, widget, frame, title):
        if title != 'null':
            self.message_queue.put(title)
            while Gtk.events_pending():
                Gtk.main_iteration()
            msg = self.web_recv()
            if msg:
                try:
                    msg = from_json(msg)
                    print('This is the message %s' % (msg))
                    if msg['status'] == 'ready':
                        self.web_send('title="%s";subtitle="%s";humidity=%s;\
cloudiness=%s;temperature=%s;draw_graph(title,subtitle,temperature,humidity,\
cloudiness);' % (self.title, self.subtitle, self.humidity, self.cloudiness,
                            self.temperature))
                    elif msg['status'] == 'exit':
                        self.close_application(None)
                except BaseException:
                    pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号