-
import tkinter as tk 设置记录logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') def list_tasks(): def run_task(task_name): def disable_task(task_name): def disable_all_tasks(): app = tk.Tk() listbox = tk.Listbox(app, height=20, width=60) btn_list = tk.Button(app, text="查看计划任务", command=list_tasks) btn_run = tk.Button(app, text="开启计划任务", command=lambda: run_task(listbox.get(listbox.curselection()))) btn_disable = tk.Button(app, text="停止计划任务", command=lambda: disable_task(listbox.get(listbox.curselection()))) btn_disable_all = tk.Button(app, text="停止所有计划任务", command=disable_all_tasks) app.mainloop() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello, Could you please share the details of the problem in English? It's not clear how the code snippet is related to Qodana |
Beta Was this translation helpful? Give feedback.
Hello,
Could you please share the details of the problem in English? It's not clear how the code snippet is related to Qodana