#!/usr/bin/env python # -*- coding: utf-8 -*- """ 距离下班时间倒计时 author: gxcuizy date: 2021-04-27 """ from tkinter import * import time import os def refresh_current_time(): """刷新当前时间""" clock_time = time.strftime('%Y-%m-%d %H:%M:%S') curr_time.config(text=clock_time) curr_time.after(1000, refresh_current_time) def refresh_down_time(): """刷新倒计时时间""" # 当前时间戳 now_time = int(time.time()) # 下班时间时分秒数据过滤 work_hour_val = int(work_hour.get()) if work_hour_val > 23: down_label.config(text='小时的区间为(00-23)') return work_minute_val = int(work_minute.get()) if work_minute_val > 59: down_label.config(text='分钟的区间为(00-59)') return work_second_val = int(work_second.get()) if work_second_val > 59: d
python基于tkinter制作下班倒计时工具
最新推荐文章于 2023-08-31 17:24:03 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)