一、
cat countDown.py
#! /usr/bin/env python3.8.5 # -*- coding: utf-8 -*- import time import tkinter.messagebox def countdown(m): try: m = int(m) except ValueError: print("Must be an integer!") else: while True: for minute in range(m, -1, -1): if minute == 0: break for second in range(59, -1, -1): time.sleep(1) print("{}:{}".format(minute-1, second)) break if __name__ == '__main__': countdown(86) tkinter.messagebox.showinfo("arun","该切录屏啦!!!")