From e934ad703a02f11109c9ba5184c0de34359ef64c Mon Sep 17 00:00:00 2001 From: 13632530821 Date: Sun, 20 Nov 2022 00:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=BA=86=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E5=BA=93=EF=BC=8C=E5=B0=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 点名器.pyw | 9 --------- 1 file changed, 9 deletions(-) diff --git a/点名器.pyw b/点名器.pyw index 0319f2b..2f3b008 100644 --- a/点名器.pyw +++ b/点名器.pyw @@ -3,9 +3,7 @@ from tkinter import * import tkinter.messagebox as msgbox import random import sys -import win32con, win32api import winsound -import time filename = "./data/names.xls" configname = "./data/config.data" @@ -119,8 +117,6 @@ for i in range(elim_rows,rows): student = Student(tmp_list[0],tmp_list[1],tmp_list[2],tmp_list[3]) students.append(student) -cur_stu = [] - cur_stu = students[:] for student in students: @@ -164,8 +160,6 @@ def sel_class(flag = 1): filter = classes[:] cur_stu = students[:] - - def choose(): global last_choice, cur_stu sel_class(0) @@ -206,11 +200,8 @@ def choose(): winsound.PlaySound(selname, winsound.SND_ASYNC | winsound.SND_FILENAME) startrandom = Button(gui, text = "立刻摇人!", font = ("宋体", 17, "bold"), height = 2, fg = "red", command = choose, bg = "white") - setclass = Button(gui, text = "应用班级选用", font = ("宋体", 17), height = 2, command = sel_class, bg = "white") - scrool = Scrollbar(gui, command = listbox.yview) - listbox.config(yscrollcommand=scrool.set) name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")