display.py 文件源码

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

项目:pyweather 作者: rbischoff 项目源码 文件源码
def run(self):
        cnt = 0
        self.display_start()

        running = True
        while running:

            pygame.time.wait(1000)
            self.update_diplay()
            cnt += 1
            if cnt >= 209:
                cnt = 0
                self.update_current_data()
            if time.strftime("%d/%m") != self._system_data.current_date:
                self._system_data.current_date = time.strftime("%d/%m")
                self.update_daily_data()
            for event in pygame.event.get():
                if event.type == pygame.QUIT:
                    running = False
                elif event.type == pygame.KEYDOWN:
                    if event.key == pygame.K_ESCAPE:
                        running = False
        pygame.quit()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号