mirror of
https://github.com/HChaZZY/Random-Picker.git
synced 2025-12-06 10:33:50 +08:00
编译
This commit is contained in:
47
.history/README_20221107174914.md
Normal file
47
.history/README_20221107174914.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# ---一个点名器的python实现---
|
||||
## 读取相同目录下的names.xls数据库文件
|
||||
## 程序启动后如果检测到数据库文件会自动加上隐藏属性
|
||||
## names.xls必须满足以下条件:
|
||||
### 1. 至少两行和不多于也不少于四列
|
||||
### 2. 第一行的四个单元格分别是 |序号|班级|学科|姓名
|
||||
### 3. 第二行以下分别按照第一行的要求填写
|
||||
|
||||
#### P.S. 第一行的四个单元格会被程序自动忽略,这四个名称只是为了让人方便阅读
|
||||
|
||||
### 软件会自动读取数据库中所有可用的班级名称,并将列举在软件右侧的选择框内。
|
||||
|
||||

|
||||
|
||||
### 左击选择框可以选择按照班级的筛选,可以多选,如果不选,则默认不进行筛选。
|
||||
|
||||

|
||||
|
||||
### 点击`立即摇人!`可以在所有满足筛选条件的人员中随机挑选一位,并将其姓名,班级号和学科种类显示在界面上。
|
||||
|
||||

|
||||
|
||||
### 点击`应用班级选用`可以提前应用筛选条件,但不会进行挑选。
|
||||
|
||||
~~但是点击摇人的时候本来就会重新应用当前选好的筛选条件,所以这个按钮其实就是做来好看的。~~
|
||||
|
||||
### 为了防止被搞心态,不会出现连续抽到两个一样的人的情况。~~因为懒得写动画所以如果连续抽到两个一样的人就几乎看不出来了~~
|
||||
|
||||
## 隐藏功能:使用config.data文件对指定编号的人员进行指定概率编辑
|
||||
|
||||
~~究竟是什么居心的人才想让我开发这么一个鬼功能~~
|
||||
|
||||

|
||||

|
||||
|
||||
### 在相同目录下编辑一个config.data文件
|
||||
### 如果程序没有检测到文件,什么都不会发生
|
||||
### 如果检测到了,自动加隐藏属性并读取文件
|
||||
### config.data需要符合以下语法:
|
||||
#### 1. 由N行组成
|
||||
#### 2. 每一行对应一位需要更改概率的序号
|
||||
#### 3. 每一行的内容为 `X,+/-/0` 即需要编辑的序号加上一个英文字符逗号加上英文字符+或者-或者数字0
|
||||
#### 4. 请再看一遍`3.`并确保你记住了每一个词
|
||||
#### 5. 如果输入了`+`,那么该序号被抽到的概率增加(前提是满足由班级选择器控制的筛选条件)。具体增加方法为每次抽人都有5% * (被标记为‘+’的人的人数)的概率只在被标记为‘+’的人中抽取,这个总概率的上限为30%。
|
||||
#### 6. 如果输入了`-`,那么该序号被抽到的概率减少。具体减少方法是每次抽人都有8% * (被标记为‘-’的人的人数)直接排除掉这些被标记的人。这个概率的上限是40%。
|
||||
#### 7. 如果输入了`0`,那么该序号便会被拒绝录入。即数据库中虽然存在该编号,但是程序不会将其视为可被抽取的对象。
|
||||
#### 8. 如欲更改配置,仅需在保存了更改后的配置文件后重启点名器程序即可。
|
||||
47
.history/README_20221107175110.md
Normal file
47
.history/README_20221107175110.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# ---一个点名器的python实现---
|
||||
## 读取相同目录下的names.xls数据库文件
|
||||
## 程序启动后如果检测到数据库文件会自动加上隐藏属性
|
||||
## names.xls必须满足以下条件:
|
||||
### 1. 至少两行和不多于也不少于四列
|
||||
### 2. 第一行的四个单元格分别是 |序号|班级|学科|姓名
|
||||
### 3. 第二行以下分别按照第一行的要求填写
|
||||
|
||||
#### P.S. 第一行的四个单元格会被程序自动忽略,这四个名称只是为了让人方便阅读
|
||||
|
||||
### 软件会自动读取数据库中所有可用的班级名称,并将列举在软件右侧的选择框内。
|
||||
|
||||

|
||||
|
||||
### 左击选择框可以选择按照班级的筛选,可以多选,如果不选,则默认不进行筛选。
|
||||
|
||||

|
||||
|
||||
### 点击`立即摇人!`可以在所有满足筛选条件的人员中随机挑选一位,并将其姓名,班级号和学科种类显示在界面上。
|
||||
|
||||

|
||||
|
||||
### 点击`应用班级选用`可以提前应用筛选条件,但不会进行挑选。
|
||||
|
||||
~~但是点击摇人的时候本来就会重新应用当前选好的筛选条件,所以这个按钮其实就是做来好看的。~~
|
||||
|
||||
### 为了防止被搞心态,不会出现连续抽到两个一样的人的情况。~~因为懒得写动画所以如果连续抽到两个一样的人就几乎看不出来了~~
|
||||
|
||||
## 隐藏功能:使用config.data文件对指定编号的人员进行指定概率编辑
|
||||
|
||||
~~究竟是什么居心的人才想让我开发这么一个鬼功能~~
|
||||
|
||||

|
||||

|
||||
|
||||
### 在相同目录下编辑一个config.data文件
|
||||
### 如果程序没有检测到文件,什么都不会发生
|
||||
### 如果检测到了,自动加隐藏属性并读取文件
|
||||
### config.data需要符合以下语法:
|
||||
#### 1. 由N行组成
|
||||
#### 2. 每一行对应一位需要更改概率的序号
|
||||
#### 3. 每一行的内容为 `X,+/-/0` 即需要编辑的序号加上一个英文字符逗号加上英文字符+或者-或者数字0
|
||||
#### 4. 请再看一遍`3.`并确保你记住了每一个词
|
||||
#### 5. 如果输入了`+`,那么该序号被抽到的概率增加(前提是满足由班级选择器控制的筛选条件),且针对这些人的防搞心态保护失效。具体增加方法为每次抽人都有5% * (被标记为‘+’的人的人数)的概率只在被标记为‘+’的人中抽取,这个总概率的上限为30%。
|
||||
#### 6. 如果输入了`-`,那么该序号被抽到的概率减少。具体减少方法是每次抽人都有8% * (被标记为‘-’的人的人数)直接排除掉这些被标记的人。这个概率的上限是40%。
|
||||
#### 7. 如果输入了`0`,那么该序号便会被拒绝录入。即数据库中虽然存在该编号,但是程序不会将其视为可被抽取的对象。
|
||||
#### 8. 如欲更改配置,仅需在保存了更改后的配置文件后重启点名器程序即可。
|
||||
189
.history/点名器_20221107012031.pyw
Normal file
189
.history/点名器_20221107012031.pyw
Normal file
@@ -0,0 +1,189 @@
|
||||
import xlrd as excel
|
||||
from tkinter import *
|
||||
import tkinter.messagebox as msgbox
|
||||
import random
|
||||
import sys
|
||||
import win32con, win32api
|
||||
|
||||
gui = Tk()
|
||||
|
||||
class Student(object):
|
||||
name = ""
|
||||
subject = ""
|
||||
id = ""
|
||||
class_name = ""
|
||||
|
||||
def __init__(self,id,class_name,subject,name):
|
||||
self.id = id
|
||||
self.class_name = class_name
|
||||
self.subject = subject
|
||||
self.name = name
|
||||
|
||||
protection_override = False
|
||||
up_percent = 30
|
||||
down_persent = 40
|
||||
filename = "names.xls"
|
||||
configname = "config.data"
|
||||
elim_rows = 1
|
||||
gui_size = "620x200"
|
||||
percent_override = True
|
||||
|
||||
try:
|
||||
excel_data = excel.open_workbook(filename)
|
||||
table = excel_data.sheets()[0]
|
||||
win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
except FileNotFoundError:
|
||||
msgbox.showerror('找不到数据库文件', '在相同目录下未能找到 names.xls 文件,请确认您的文件存在', parent=gui)
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
cols = table.ncols
|
||||
rows = table.nrows
|
||||
assert cols == 4
|
||||
assert rows > 1
|
||||
except AssertionError:
|
||||
msgbox.showerror('数据库文件格式不正确', '数据库文件内行/列数不合法,请确认数据库文件拥有超过1的行数和等于4的列数,当前行数:' + str(rows) + ' 当前列数:' + str(cols), parent=gui)
|
||||
sys.exit()
|
||||
|
||||
elim_id = []
|
||||
up_id = []
|
||||
down_id = []
|
||||
|
||||
try:
|
||||
with open(configname,'r') as file:
|
||||
win32api.SetFileAttributes(configname,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
config = file.read().splitlines()
|
||||
for unit in config:
|
||||
temp = unit.split(",")
|
||||
if temp[1] == '0':
|
||||
elim_id.append(int(temp[0]))
|
||||
elif temp[1] == '+':
|
||||
up_id.append(int(temp[0]))
|
||||
elif temp[1] == "-":
|
||||
down_id.append(int(temp[0]))
|
||||
else:
|
||||
pass
|
||||
except:
|
||||
percent_override = False
|
||||
|
||||
up_percent = len(up_id) * 5 if len(up_id) <= 6 else 30
|
||||
down_percent = len(down_id) * 8 if len(down_id) <= 5 else 40
|
||||
|
||||
students = []
|
||||
classes = []
|
||||
subjects = []
|
||||
filter = []
|
||||
|
||||
last_choice = ""
|
||||
|
||||
# print("读取数据库成功:" + str(cols) + "列 " + str(rows) + "行")
|
||||
|
||||
for i in range(elim_rows,rows):
|
||||
tmp_list = [str(table.cell_value(i,j)) for j in range(0,cols)]
|
||||
if (int(float(tmp_list[0])) not in elim_id):
|
||||
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:
|
||||
if student.class_name not in classes:
|
||||
classes.append(student.class_name)
|
||||
if student.subject not in subjects:
|
||||
subjects.append(student.subject)
|
||||
|
||||
gui.title("点名器")
|
||||
gui.geometry(gui_size)
|
||||
gui.resizable(0,0)
|
||||
gui.configure(bg = "white")
|
||||
|
||||
cur_name = StringVar()
|
||||
|
||||
def upd_name(name):
|
||||
cur_name.set(name)
|
||||
|
||||
upd_name("")
|
||||
|
||||
listbox = Listbox(gui, selectmode = MULTIPLE, height = 5)
|
||||
|
||||
for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
filter.append(classes[selection])
|
||||
# print(filter)
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
# print(student.name)
|
||||
cur_stu.append(student)
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
# 触发30%概率,从up中挑选
|
||||
if (random.randint(1,100) < up_percent and percent_override):
|
||||
protection_override = True;
|
||||
temp = []
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) in up_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
elif (random.randint(1,100) < down_persent and percent_override):
|
||||
protection_override = True;
|
||||
temp = [];
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) not in down_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
else:
|
||||
protection_override = False
|
||||
|
||||
if not cur_stu:
|
||||
protection_override = False
|
||||
sel_class(0)
|
||||
|
||||
choice = random.choice(cur_stu)
|
||||
# print(choice.name)
|
||||
counter = 0;
|
||||
while (last_choice == choice.name and (not protection_override)) or choice.id in elim_id:
|
||||
choice = random.choice(cur_stu)
|
||||
counter = counter + 1
|
||||
if counter >= 100:
|
||||
break
|
||||
# print(choice.name)
|
||||
upd_name(choice.name)
|
||||
class_label.config(text = choice.class_name)
|
||||
subject_label.config(text = choice.subject)
|
||||
last_choice = choice.name
|
||||
|
||||
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")
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
|
||||
class_label.grid(row = 2, column = 1, sticky = N+S+E+W)
|
||||
subject_label.grid(row = 2, column = 2, sticky = N+S+E+W)
|
||||
name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
|
||||
gui.mainloop()
|
||||
189
.history/点名器_20221107175501.pyw
Normal file
189
.history/点名器_20221107175501.pyw
Normal file
@@ -0,0 +1,189 @@
|
||||
import xlrd as excel
|
||||
from tkinter import *
|
||||
import tkinter.messagebox as msgbox
|
||||
import random
|
||||
import sys
|
||||
import win32con, win32api
|
||||
|
||||
gui_size = "620x200"
|
||||
|
||||
gui = Tk()
|
||||
|
||||
gui.title("点名器")
|
||||
gui.geometry(gui_size)
|
||||
gui.resizable(0,0)
|
||||
gui.configure(bg = "white")
|
||||
class Student(object):
|
||||
name = ""
|
||||
subject = ""
|
||||
id = ""
|
||||
class_name = ""
|
||||
|
||||
def __init__(self,id,class_name,subject,name):
|
||||
self.id = id
|
||||
self.class_name = class_name
|
||||
self.subject = subject
|
||||
self.name = name
|
||||
|
||||
protection_override = False
|
||||
up_percent = 30
|
||||
down_persent = 40
|
||||
filename = "names.xls"
|
||||
configname = "config.data"
|
||||
elim_rows = 1
|
||||
percent_override = True
|
||||
|
||||
try:
|
||||
excel_data = excel.open_workbook(filename)
|
||||
table = excel_data.sheets()[0]
|
||||
win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
except FileNotFoundError:
|
||||
msgbox.showerror('找不到数据库文件', '在相同目录下未能找到 names.xls 文件,请确认您的文件存在', parent=gui)
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
cols = table.ncols
|
||||
rows = table.nrows
|
||||
assert cols == 4
|
||||
assert rows > 1
|
||||
except AssertionError:
|
||||
msgbox.showerror('数据库文件格式不正确', '数据库文件内行/列数不合法,请确认数据库文件拥有超过1的行数和等于4的列数,当前行数:' + str(rows) + ' 当前列数:' + str(cols), parent=gui)
|
||||
sys.exit()
|
||||
|
||||
elim_id = []
|
||||
up_id = []
|
||||
down_id = []
|
||||
|
||||
try:
|
||||
with open(configname,'r') as file:
|
||||
win32api.SetFileAttributes(configname,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
config = file.read().splitlines()
|
||||
for unit in config:
|
||||
temp = unit.split(",")
|
||||
if temp[1] == '0':
|
||||
elim_id.append(int(temp[0]))
|
||||
elif temp[1] == '+':
|
||||
up_id.append(int(temp[0]))
|
||||
elif temp[1] == "-":
|
||||
down_id.append(int(temp[0]))
|
||||
else:
|
||||
pass
|
||||
except:
|
||||
percent_override = False
|
||||
|
||||
up_percent = len(up_id) * 5 if len(up_id) <= 6 else 30
|
||||
down_percent = len(down_id) * 8 if len(down_id) <= 5 else 40
|
||||
|
||||
students = []
|
||||
classes = []
|
||||
subjects = []
|
||||
filter = []
|
||||
|
||||
last_choice = ""
|
||||
|
||||
# print("读取数据库成功:" + str(cols) + "列 " + str(rows) + "行")
|
||||
|
||||
for i in range(elim_rows,rows):
|
||||
tmp_list = [str(table.cell_value(i,j)) for j in range(0,cols)]
|
||||
if (int(float(tmp_list[0])) not in elim_id):
|
||||
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:
|
||||
if student.class_name not in classes:
|
||||
classes.append(student.class_name)
|
||||
if student.subject not in subjects:
|
||||
subjects.append(student.subject)
|
||||
|
||||
cur_name = StringVar()
|
||||
|
||||
def upd_name(name):
|
||||
cur_name.set(name)
|
||||
|
||||
upd_name("")
|
||||
|
||||
listbox = Listbox(gui, selectmode = MULTIPLE, height = 5)
|
||||
|
||||
for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
filter.append(classes[selection])
|
||||
# print(filter)
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
# print(student.name)
|
||||
cur_stu.append(student)
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
# 触发30%概率,从up中挑选
|
||||
if (random.randint(1,100) < up_percent and percent_override):
|
||||
protection_override = True;
|
||||
temp = []
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) in up_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
elif (random.randint(1,100) < down_persent and percent_override):
|
||||
protection_override = True;
|
||||
temp = [];
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) not in down_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
else:
|
||||
protection_override = False
|
||||
|
||||
if not cur_stu:
|
||||
protection_override = False
|
||||
sel_class(0)
|
||||
|
||||
choice = random.choice(cur_stu)
|
||||
# print(choice.name)
|
||||
counter = 0;
|
||||
while (last_choice == choice.name and (not protection_override)) or choice.id in elim_id:
|
||||
choice = random.choice(cur_stu)
|
||||
counter = counter + 1
|
||||
if counter >= 100:
|
||||
break
|
||||
# print(choice.name)
|
||||
upd_name(choice.name)
|
||||
class_label.config(text = choice.class_name)
|
||||
subject_label.config(text = choice.subject)
|
||||
last_choice = choice.name
|
||||
|
||||
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")
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
|
||||
class_label.grid(row = 2, column = 1, sticky = N+S+E+W)
|
||||
subject_label.grid(row = 2, column = 2, sticky = N+S+E+W)
|
||||
name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
|
||||
gui.mainloop()
|
||||
189
.history/点名器_20221107175513.pyw
Normal file
189
.history/点名器_20221107175513.pyw
Normal file
@@ -0,0 +1,189 @@
|
||||
import xlrd as excel
|
||||
from tkinter import *
|
||||
import tkinter.messagebox as msgbox
|
||||
import random
|
||||
import sys
|
||||
import win32con, win32api
|
||||
|
||||
gui_size = "620x200"
|
||||
|
||||
gui = Tk()
|
||||
|
||||
gui.title("点名器")
|
||||
gui.geometry(gui_size)
|
||||
gui.resizable(0,0)
|
||||
gui.configure(bg = "white")
|
||||
class Student(object):
|
||||
name = ""
|
||||
subject = ""
|
||||
id = ""
|
||||
class_name = ""
|
||||
|
||||
def __init__(self,id,class_name,subject,name):
|
||||
self.id = id
|
||||
self.class_name = class_name
|
||||
self.subject = subject
|
||||
self.name = name
|
||||
|
||||
protection_override = False
|
||||
up_percent = 30
|
||||
down_persent = 40
|
||||
filename = "names.xls"
|
||||
configname = "config.data"
|
||||
elim_rows = 1
|
||||
percent_override = True
|
||||
|
||||
try:
|
||||
excel_data = excel.open_workbook(filename)
|
||||
table = excel_data.sheets()[0]
|
||||
win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
except FileNotFoundError:
|
||||
msgbox.showerror('找不到数据库文件', '在相同目录下未能找到 names.xls 文件,请确认您的文件存在')
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
cols = table.ncols
|
||||
rows = table.nrows
|
||||
assert cols == 4
|
||||
assert rows > 1
|
||||
except AssertionError:
|
||||
msgbox.showerror('数据库文件格式不正确', '数据库文件内行/列数不合法,请确认数据库文件拥有超过1的行数和等于4的列数,当前行数:' + str(rows) + ' 当前列数:' + str(cols))
|
||||
sys.exit()
|
||||
|
||||
elim_id = []
|
||||
up_id = []
|
||||
down_id = []
|
||||
|
||||
try:
|
||||
with open(configname,'r') as file:
|
||||
win32api.SetFileAttributes(configname,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
config = file.read().splitlines()
|
||||
for unit in config:
|
||||
temp = unit.split(",")
|
||||
if temp[1] == '0':
|
||||
elim_id.append(int(temp[0]))
|
||||
elif temp[1] == '+':
|
||||
up_id.append(int(temp[0]))
|
||||
elif temp[1] == "-":
|
||||
down_id.append(int(temp[0]))
|
||||
else:
|
||||
pass
|
||||
except:
|
||||
percent_override = False
|
||||
|
||||
up_percent = len(up_id) * 5 if len(up_id) <= 6 else 30
|
||||
down_percent = len(down_id) * 8 if len(down_id) <= 5 else 40
|
||||
|
||||
students = []
|
||||
classes = []
|
||||
subjects = []
|
||||
filter = []
|
||||
|
||||
last_choice = ""
|
||||
|
||||
# print("读取数据库成功:" + str(cols) + "列 " + str(rows) + "行")
|
||||
|
||||
for i in range(elim_rows,rows):
|
||||
tmp_list = [str(table.cell_value(i,j)) for j in range(0,cols)]
|
||||
if (int(float(tmp_list[0])) not in elim_id):
|
||||
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:
|
||||
if student.class_name not in classes:
|
||||
classes.append(student.class_name)
|
||||
if student.subject not in subjects:
|
||||
subjects.append(student.subject)
|
||||
|
||||
cur_name = StringVar()
|
||||
|
||||
def upd_name(name):
|
||||
cur_name.set(name)
|
||||
|
||||
upd_name("")
|
||||
|
||||
listbox = Listbox(gui, selectmode = MULTIPLE, height = 5)
|
||||
|
||||
for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
filter.append(classes[selection])
|
||||
# print(filter)
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
# print(student.name)
|
||||
cur_stu.append(student)
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
# 触发30%概率,从up中挑选
|
||||
if (random.randint(1,100) < up_percent and percent_override):
|
||||
protection_override = True;
|
||||
temp = []
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) in up_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
elif (random.randint(1,100) < down_persent and percent_override):
|
||||
protection_override = True;
|
||||
temp = [];
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) not in down_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
else:
|
||||
protection_override = False
|
||||
|
||||
if not cur_stu:
|
||||
protection_override = False
|
||||
sel_class(0)
|
||||
|
||||
choice = random.choice(cur_stu)
|
||||
# print(choice.name)
|
||||
counter = 0;
|
||||
while (last_choice == choice.name and (not protection_override)) or choice.id in elim_id:
|
||||
choice = random.choice(cur_stu)
|
||||
counter = counter + 1
|
||||
if counter >= 100:
|
||||
break
|
||||
# print(choice.name)
|
||||
upd_name(choice.name)
|
||||
class_label.config(text = choice.class_name)
|
||||
subject_label.config(text = choice.subject)
|
||||
last_choice = choice.name
|
||||
|
||||
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")
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
|
||||
class_label.grid(row = 2, column = 1, sticky = N+S+E+W)
|
||||
subject_label.grid(row = 2, column = 2, sticky = N+S+E+W)
|
||||
name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
|
||||
gui.mainloop()
|
||||
192
.history/点名器_20221107175603.pyw
Normal file
192
.history/点名器_20221107175603.pyw
Normal file
@@ -0,0 +1,192 @@
|
||||
import xlrd as excel
|
||||
from tkinter import *
|
||||
import tkinter.messagebox as msgbox
|
||||
import random
|
||||
import sys
|
||||
import win32con, win32api
|
||||
|
||||
gui_size = "620x200"
|
||||
|
||||
gui = Tk()
|
||||
|
||||
gui.title("点名器")
|
||||
gui.geometry("0x0")
|
||||
gui.resizable(0,0)
|
||||
gui.configure(bg = "white")
|
||||
class Student(object):
|
||||
name = ""
|
||||
subject = ""
|
||||
id = ""
|
||||
class_name = ""
|
||||
|
||||
def __init__(self,id,class_name,subject,name):
|
||||
self.id = id
|
||||
self.class_name = class_name
|
||||
self.subject = subject
|
||||
self.name = name
|
||||
|
||||
protection_override = False
|
||||
up_percent = 30
|
||||
down_persent = 40
|
||||
filename = "names.xls"
|
||||
configname = "config.data"
|
||||
elim_rows = 1
|
||||
percent_override = True
|
||||
|
||||
try:
|
||||
excel_data = excel.open_workbook(filename)
|
||||
table = excel_data.sheets()[0]
|
||||
win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
except FileNotFoundError:
|
||||
msgbox.showerror('找不到数据库文件', '在相同目录下未能找到 names.xls 文件,请确认您的文件存在')
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
cols = table.ncols
|
||||
rows = table.nrows
|
||||
assert cols == 4
|
||||
assert rows > 1
|
||||
except AssertionError:
|
||||
msgbox.showerror('数据库文件格式不正确', '数据库文件内行/列数不合法,请确认数据库文件拥有超过1的行数和等于4的列数,当前行数:' + str(rows) + ' 当前列数:' + str(cols))
|
||||
sys.exit()
|
||||
|
||||
elim_id = []
|
||||
up_id = []
|
||||
down_id = []
|
||||
|
||||
try:
|
||||
with open(configname,'r') as file:
|
||||
win32api.SetFileAttributes(configname,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
config = file.read().splitlines()
|
||||
for unit in config:
|
||||
temp = unit.split(",")
|
||||
if temp[1] == '0':
|
||||
elim_id.append(int(temp[0]))
|
||||
elif temp[1] == '+':
|
||||
up_id.append(int(temp[0]))
|
||||
elif temp[1] == "-":
|
||||
down_id.append(int(temp[0]))
|
||||
else:
|
||||
pass
|
||||
except:
|
||||
percent_override = False
|
||||
|
||||
up_percent = len(up_id) * 5 if len(up_id) <= 6 else 30
|
||||
down_percent = len(down_id) * 8 if len(down_id) <= 5 else 40
|
||||
|
||||
|
||||
gui.geometry("0x0")
|
||||
|
||||
students = []
|
||||
classes = []
|
||||
subjects = []
|
||||
filter = []
|
||||
|
||||
last_choice = ""
|
||||
|
||||
# print("读取数据库成功:" + str(cols) + "列 " + str(rows) + "行")
|
||||
|
||||
for i in range(elim_rows,rows):
|
||||
tmp_list = [str(table.cell_value(i,j)) for j in range(0,cols)]
|
||||
if (int(float(tmp_list[0])) not in elim_id):
|
||||
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:
|
||||
if student.class_name not in classes:
|
||||
classes.append(student.class_name)
|
||||
if student.subject not in subjects:
|
||||
subjects.append(student.subject)
|
||||
|
||||
cur_name = StringVar()
|
||||
|
||||
def upd_name(name):
|
||||
cur_name.set(name)
|
||||
|
||||
upd_name("")
|
||||
|
||||
listbox = Listbox(gui, selectmode = MULTIPLE, height = 5)
|
||||
|
||||
for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
filter.append(classes[selection])
|
||||
# print(filter)
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
# print(student.name)
|
||||
cur_stu.append(student)
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
# 触发30%概率,从up中挑选
|
||||
if (random.randint(1,100) < up_percent and percent_override):
|
||||
protection_override = True;
|
||||
temp = []
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) in up_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
elif (random.randint(1,100) < down_persent and percent_override):
|
||||
protection_override = True;
|
||||
temp = [];
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) not in down_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
else:
|
||||
protection_override = False
|
||||
|
||||
if not cur_stu:
|
||||
protection_override = False
|
||||
sel_class(0)
|
||||
|
||||
choice = random.choice(cur_stu)
|
||||
# print(choice.name)
|
||||
counter = 0;
|
||||
while (last_choice == choice.name and (not protection_override)) or choice.id in elim_id:
|
||||
choice = random.choice(cur_stu)
|
||||
counter = counter + 1
|
||||
if counter >= 100:
|
||||
break
|
||||
# print(choice.name)
|
||||
upd_name(choice.name)
|
||||
class_label.config(text = choice.class_name)
|
||||
subject_label.config(text = choice.subject)
|
||||
last_choice = choice.name
|
||||
|
||||
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")
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
|
||||
class_label.grid(row = 2, column = 1, sticky = N+S+E+W)
|
||||
subject_label.grid(row = 2, column = 2, sticky = N+S+E+W)
|
||||
name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
|
||||
gui.mainloop()
|
||||
191
.history/点名器_20221107175606.pyw
Normal file
191
.history/点名器_20221107175606.pyw
Normal file
@@ -0,0 +1,191 @@
|
||||
import xlrd as excel
|
||||
from tkinter import *
|
||||
import tkinter.messagebox as msgbox
|
||||
import random
|
||||
import sys
|
||||
import win32con, win32api
|
||||
|
||||
gui_size = "620x200"
|
||||
|
||||
gui = Tk()
|
||||
|
||||
gui.title("点名器")
|
||||
gui.geometry("0x0")
|
||||
gui.resizable(0,0)
|
||||
gui.configure(bg = "white")
|
||||
class Student(object):
|
||||
name = ""
|
||||
subject = ""
|
||||
id = ""
|
||||
class_name = ""
|
||||
|
||||
def __init__(self,id,class_name,subject,name):
|
||||
self.id = id
|
||||
self.class_name = class_name
|
||||
self.subject = subject
|
||||
self.name = name
|
||||
|
||||
protection_override = False
|
||||
up_percent = 30
|
||||
down_persent = 40
|
||||
filename = "names.xls"
|
||||
configname = "config.data"
|
||||
elim_rows = 1
|
||||
percent_override = True
|
||||
|
||||
try:
|
||||
excel_data = excel.open_workbook(filename)
|
||||
table = excel_data.sheets()[0]
|
||||
win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
except FileNotFoundError:
|
||||
msgbox.showerror('找不到数据库文件', '在相同目录下未能找到 names.xls 文件,请确认您的文件存在')
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
cols = table.ncols
|
||||
rows = table.nrows
|
||||
assert cols == 4
|
||||
assert rows > 1
|
||||
except AssertionError:
|
||||
msgbox.showerror('数据库文件格式不正确', '数据库文件内行/列数不合法,请确认数据库文件拥有超过1的行数和等于4的列数,当前行数:' + str(rows) + ' 当前列数:' + str(cols))
|
||||
sys.exit()
|
||||
|
||||
elim_id = []
|
||||
up_id = []
|
||||
down_id = []
|
||||
|
||||
try:
|
||||
with open(configname,'r') as file:
|
||||
win32api.SetFileAttributes(configname,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
config = file.read().splitlines()
|
||||
for unit in config:
|
||||
temp = unit.split(",")
|
||||
if temp[1] == '0':
|
||||
elim_id.append(int(temp[0]))
|
||||
elif temp[1] == '+':
|
||||
up_id.append(int(temp[0]))
|
||||
elif temp[1] == "-":
|
||||
down_id.append(int(temp[0]))
|
||||
else:
|
||||
pass
|
||||
except:
|
||||
percent_override = False
|
||||
|
||||
up_percent = len(up_id) * 5 if len(up_id) <= 6 else 30
|
||||
down_percent = len(down_id) * 8 if len(down_id) <= 5 else 40
|
||||
|
||||
gui.geometry("0x0")
|
||||
|
||||
students = []
|
||||
classes = []
|
||||
subjects = []
|
||||
filter = []
|
||||
|
||||
last_choice = ""
|
||||
|
||||
# print("读取数据库成功:" + str(cols) + "列 " + str(rows) + "行")
|
||||
|
||||
for i in range(elim_rows,rows):
|
||||
tmp_list = [str(table.cell_value(i,j)) for j in range(0,cols)]
|
||||
if (int(float(tmp_list[0])) not in elim_id):
|
||||
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:
|
||||
if student.class_name not in classes:
|
||||
classes.append(student.class_name)
|
||||
if student.subject not in subjects:
|
||||
subjects.append(student.subject)
|
||||
|
||||
cur_name = StringVar()
|
||||
|
||||
def upd_name(name):
|
||||
cur_name.set(name)
|
||||
|
||||
upd_name("")
|
||||
|
||||
listbox = Listbox(gui, selectmode = MULTIPLE, height = 5)
|
||||
|
||||
for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
filter.append(classes[selection])
|
||||
# print(filter)
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
# print(student.name)
|
||||
cur_stu.append(student)
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
# 触发30%概率,从up中挑选
|
||||
if (random.randint(1,100) < up_percent and percent_override):
|
||||
protection_override = True;
|
||||
temp = []
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) in up_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
elif (random.randint(1,100) < down_persent and percent_override):
|
||||
protection_override = True;
|
||||
temp = [];
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) not in down_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
else:
|
||||
protection_override = False
|
||||
|
||||
if not cur_stu:
|
||||
protection_override = False
|
||||
sel_class(0)
|
||||
|
||||
choice = random.choice(cur_stu)
|
||||
# print(choice.name)
|
||||
counter = 0;
|
||||
while (last_choice == choice.name and (not protection_override)) or choice.id in elim_id:
|
||||
choice = random.choice(cur_stu)
|
||||
counter = counter + 1
|
||||
if counter >= 100:
|
||||
break
|
||||
# print(choice.name)
|
||||
upd_name(choice.name)
|
||||
class_label.config(text = choice.class_name)
|
||||
subject_label.config(text = choice.subject)
|
||||
last_choice = choice.name
|
||||
|
||||
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")
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
|
||||
class_label.grid(row = 2, column = 1, sticky = N+S+E+W)
|
||||
subject_label.grid(row = 2, column = 2, sticky = N+S+E+W)
|
||||
name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
|
||||
gui.mainloop()
|
||||
191
.history/点名器_20221107175614.pyw
Normal file
191
.history/点名器_20221107175614.pyw
Normal file
@@ -0,0 +1,191 @@
|
||||
import xlrd as excel
|
||||
from tkinter import *
|
||||
import tkinter.messagebox as msgbox
|
||||
import random
|
||||
import sys
|
||||
import win32con, win32api
|
||||
|
||||
gui_size = "620x200"
|
||||
|
||||
gui = Tk()
|
||||
|
||||
gui.title("点名器")
|
||||
gui.geometry("0x0")
|
||||
gui.resizable(0,0)
|
||||
gui.configure(bg = "white")
|
||||
class Student(object):
|
||||
name = ""
|
||||
subject = ""
|
||||
id = ""
|
||||
class_name = ""
|
||||
|
||||
def __init__(self,id,class_name,subject,name):
|
||||
self.id = id
|
||||
self.class_name = class_name
|
||||
self.subject = subject
|
||||
self.name = name
|
||||
|
||||
protection_override = False
|
||||
up_percent = 30
|
||||
down_persent = 40
|
||||
filename = "names.xls"
|
||||
configname = "config.data"
|
||||
elim_rows = 1
|
||||
percent_override = True
|
||||
|
||||
try:
|
||||
excel_data = excel.open_workbook(filename)
|
||||
table = excel_data.sheets()[0]
|
||||
win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
except FileNotFoundError:
|
||||
msgbox.showerror('找不到数据库文件', '在相同目录下未能找到 names.xls 文件,请确认您的文件存在')
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
cols = table.ncols
|
||||
rows = table.nrows
|
||||
assert cols == 4
|
||||
assert rows > 1
|
||||
except AssertionError:
|
||||
msgbox.showerror('数据库文件格式不正确', '数据库文件内行/列数不合法,请确认数据库文件拥有超过1的行数和等于4的列数,当前行数:' + str(rows) + ' 当前列数:' + str(cols))
|
||||
sys.exit()
|
||||
|
||||
elim_id = []
|
||||
up_id = []
|
||||
down_id = []
|
||||
|
||||
try:
|
||||
with open(configname,'r') as file:
|
||||
win32api.SetFileAttributes(configname,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
config = file.read().splitlines()
|
||||
for unit in config:
|
||||
temp = unit.split(",")
|
||||
if temp[1] == '0':
|
||||
elim_id.append(int(temp[0]))
|
||||
elif temp[1] == '+':
|
||||
up_id.append(int(temp[0]))
|
||||
elif temp[1] == "-":
|
||||
down_id.append(int(temp[0]))
|
||||
else:
|
||||
pass
|
||||
except:
|
||||
percent_override = False
|
||||
|
||||
up_percent = len(up_id) * 5 if len(up_id) <= 6 else 30
|
||||
down_percent = len(down_id) * 8 if len(down_id) <= 5 else 40
|
||||
|
||||
gui.geometry(gui_size)
|
||||
|
||||
students = []
|
||||
classes = []
|
||||
subjects = []
|
||||
filter = []
|
||||
|
||||
last_choice = ""
|
||||
|
||||
# print("读取数据库成功:" + str(cols) + "列 " + str(rows) + "行")
|
||||
|
||||
for i in range(elim_rows,rows):
|
||||
tmp_list = [str(table.cell_value(i,j)) for j in range(0,cols)]
|
||||
if (int(float(tmp_list[0])) not in elim_id):
|
||||
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:
|
||||
if student.class_name not in classes:
|
||||
classes.append(student.class_name)
|
||||
if student.subject not in subjects:
|
||||
subjects.append(student.subject)
|
||||
|
||||
cur_name = StringVar()
|
||||
|
||||
def upd_name(name):
|
||||
cur_name.set(name)
|
||||
|
||||
upd_name("")
|
||||
|
||||
listbox = Listbox(gui, selectmode = MULTIPLE, height = 5)
|
||||
|
||||
for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
filter.append(classes[selection])
|
||||
# print(filter)
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
# print(student.name)
|
||||
cur_stu.append(student)
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
# 触发30%概率,从up中挑选
|
||||
if (random.randint(1,100) < up_percent and percent_override):
|
||||
protection_override = True;
|
||||
temp = []
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) in up_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
elif (random.randint(1,100) < down_persent and percent_override):
|
||||
protection_override = True;
|
||||
temp = [];
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) not in down_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
else:
|
||||
protection_override = False
|
||||
|
||||
if not cur_stu:
|
||||
protection_override = False
|
||||
sel_class(0)
|
||||
|
||||
choice = random.choice(cur_stu)
|
||||
# print(choice.name)
|
||||
counter = 0;
|
||||
while (last_choice == choice.name and (not protection_override)) or choice.id in elim_id:
|
||||
choice = random.choice(cur_stu)
|
||||
counter = counter + 1
|
||||
if counter >= 100:
|
||||
break
|
||||
# print(choice.name)
|
||||
upd_name(choice.name)
|
||||
class_label.config(text = choice.class_name)
|
||||
subject_label.config(text = choice.subject)
|
||||
last_choice = choice.name
|
||||
|
||||
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")
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
|
||||
class_label.grid(row = 2, column = 1, sticky = N+S+E+W)
|
||||
subject_label.grid(row = 2, column = 2, sticky = N+S+E+W)
|
||||
name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
|
||||
gui.mainloop()
|
||||
190
.history/点名器_20221107175730.pyw
Normal file
190
.history/点名器_20221107175730.pyw
Normal file
@@ -0,0 +1,190 @@
|
||||
import xlrd as excel
|
||||
from tkinter import *
|
||||
import tkinter.messagebox as msgbox
|
||||
import random
|
||||
import sys
|
||||
import win32con, win32api
|
||||
|
||||
gui_size = "620x200"
|
||||
|
||||
gui = Tk()
|
||||
|
||||
gui.withdraw()
|
||||
gui.title("点名器")
|
||||
gui.geometry(gui_size)
|
||||
gui.resizable(0,0)
|
||||
gui.configure(bg = "white")
|
||||
class Student(object):
|
||||
name = ""
|
||||
subject = ""
|
||||
id = ""
|
||||
class_name = ""
|
||||
|
||||
def __init__(self,id,class_name,subject,name):
|
||||
self.id = id
|
||||
self.class_name = class_name
|
||||
self.subject = subject
|
||||
self.name = name
|
||||
|
||||
protection_override = False
|
||||
up_percent = 30
|
||||
down_persent = 40
|
||||
filename = "names.xls"
|
||||
configname = "config.data"
|
||||
elim_rows = 1
|
||||
percent_override = True
|
||||
|
||||
try:
|
||||
excel_data = excel.open_workbook(filename)
|
||||
table = excel_data.sheets()[0]
|
||||
win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
except FileNotFoundError:
|
||||
msgbox.showerror('找不到数据库文件', '在相同目录下未能找到 names.xls 文件,请确认您的文件存在')
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
cols = table.ncols
|
||||
rows = table.nrows
|
||||
assert cols == 4
|
||||
assert rows > 1
|
||||
except AssertionError:
|
||||
msgbox.showerror('数据库文件格式不正确', '数据库文件内行/列数不合法,请确认数据库文件拥有超过1的行数和等于4的列数,当前行数:' + str(rows) + ' 当前列数:' + str(cols))
|
||||
sys.exit()
|
||||
|
||||
elim_id = []
|
||||
up_id = []
|
||||
down_id = []
|
||||
|
||||
try:
|
||||
with open(configname,'r') as file:
|
||||
win32api.SetFileAttributes(configname,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
config = file.read().splitlines()
|
||||
for unit in config:
|
||||
temp = unit.split(",")
|
||||
if temp[1] == '0':
|
||||
elim_id.append(int(temp[0]))
|
||||
elif temp[1] == '+':
|
||||
up_id.append(int(temp[0]))
|
||||
elif temp[1] == "-":
|
||||
down_id.append(int(temp[0]))
|
||||
else:
|
||||
pass
|
||||
except:
|
||||
percent_override = False
|
||||
|
||||
up_percent = len(up_id) * 5 if len(up_id) <= 6 else 30
|
||||
down_percent = len(down_id) * 8 if len(down_id) <= 5 else 40
|
||||
|
||||
students = []
|
||||
classes = []
|
||||
subjects = []
|
||||
filter = []
|
||||
|
||||
last_choice = ""
|
||||
|
||||
# print("读取数据库成功:" + str(cols) + "列 " + str(rows) + "行")
|
||||
|
||||
for i in range(elim_rows,rows):
|
||||
tmp_list = [str(table.cell_value(i,j)) for j in range(0,cols)]
|
||||
if (int(float(tmp_list[0])) not in elim_id):
|
||||
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:
|
||||
if student.class_name not in classes:
|
||||
classes.append(student.class_name)
|
||||
if student.subject not in subjects:
|
||||
subjects.append(student.subject)
|
||||
|
||||
cur_name = StringVar()
|
||||
|
||||
def upd_name(name):
|
||||
cur_name.set(name)
|
||||
|
||||
upd_name("")
|
||||
|
||||
listbox = Listbox(gui, selectmode = MULTIPLE, height = 5)
|
||||
|
||||
for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
filter.append(classes[selection])
|
||||
# print(filter)
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
# print(student.name)
|
||||
cur_stu.append(student)
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
# 触发30%概率,从up中挑选
|
||||
if (random.randint(1,100) < up_percent and percent_override):
|
||||
protection_override = True;
|
||||
temp = []
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) in up_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
elif (random.randint(1,100) < down_persent and percent_override):
|
||||
protection_override = True;
|
||||
temp = [];
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) not in down_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
else:
|
||||
protection_override = False
|
||||
|
||||
if not cur_stu:
|
||||
protection_override = False
|
||||
sel_class(0)
|
||||
|
||||
choice = random.choice(cur_stu)
|
||||
# print(choice.name)
|
||||
counter = 0;
|
||||
while (last_choice == choice.name and (not protection_override)) or choice.id in elim_id:
|
||||
choice = random.choice(cur_stu)
|
||||
counter = counter + 1
|
||||
if counter >= 100:
|
||||
break
|
||||
# print(choice.name)
|
||||
upd_name(choice.name)
|
||||
class_label.config(text = choice.class_name)
|
||||
subject_label.config(text = choice.subject)
|
||||
last_choice = choice.name
|
||||
|
||||
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")
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
|
||||
class_label.grid(row = 2, column = 1, sticky = N+S+E+W)
|
||||
subject_label.grid(row = 2, column = 2, sticky = N+S+E+W)
|
||||
name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
|
||||
gui.mainloop()
|
||||
192
.history/点名器_20221107175743.pyw
Normal file
192
.history/点名器_20221107175743.pyw
Normal file
@@ -0,0 +1,192 @@
|
||||
import xlrd as excel
|
||||
from tkinter import *
|
||||
import tkinter.messagebox as msgbox
|
||||
import random
|
||||
import sys
|
||||
import win32con, win32api
|
||||
|
||||
gui_size = "620x200"
|
||||
|
||||
gui = Tk()
|
||||
|
||||
gui.withdraw()
|
||||
gui.title("点名器")
|
||||
gui.geometry(gui_size)
|
||||
gui.resizable(0,0)
|
||||
gui.configure(bg = "white")
|
||||
class Student(object):
|
||||
name = ""
|
||||
subject = ""
|
||||
id = ""
|
||||
class_name = ""
|
||||
|
||||
def __init__(self,id,class_name,subject,name):
|
||||
self.id = id
|
||||
self.class_name = class_name
|
||||
self.subject = subject
|
||||
self.name = name
|
||||
|
||||
protection_override = False
|
||||
up_percent = 30
|
||||
down_persent = 40
|
||||
filename = "names.xls"
|
||||
configname = "config.data"
|
||||
elim_rows = 1
|
||||
percent_override = True
|
||||
|
||||
try:
|
||||
excel_data = excel.open_workbook(filename)
|
||||
table = excel_data.sheets()[0]
|
||||
win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
except FileNotFoundError:
|
||||
msgbox.showerror('找不到数据库文件', '在相同目录下未能找到 names.xls 文件,请确认您的文件存在')
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
cols = table.ncols
|
||||
rows = table.nrows
|
||||
assert cols == 4
|
||||
assert rows > 1
|
||||
except AssertionError:
|
||||
msgbox.showerror('数据库文件格式不正确', '数据库文件内行/列数不合法,请确认数据库文件拥有超过1的行数和等于4的列数,当前行数:' + str(rows) + ' 当前列数:' + str(cols))
|
||||
sys.exit()
|
||||
|
||||
elim_id = []
|
||||
up_id = []
|
||||
down_id = []
|
||||
|
||||
try:
|
||||
with open(configname,'r') as file:
|
||||
win32api.SetFileAttributes(configname,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
config = file.read().splitlines()
|
||||
for unit in config:
|
||||
temp = unit.split(",")
|
||||
if temp[1] == '0':
|
||||
elim_id.append(int(temp[0]))
|
||||
elif temp[1] == '+':
|
||||
up_id.append(int(temp[0]))
|
||||
elif temp[1] == "-":
|
||||
down_id.append(int(temp[0]))
|
||||
else:
|
||||
pass
|
||||
except:
|
||||
percent_override = False
|
||||
|
||||
up_percent = len(up_id) * 5 if len(up_id) <= 6 else 30
|
||||
down_percent = len(down_id) * 8 if len(down_id) <= 5 else 40
|
||||
|
||||
gui.deiconify();
|
||||
|
||||
students = []
|
||||
classes = []
|
||||
subjects = []
|
||||
filter = []
|
||||
|
||||
last_choice = ""
|
||||
|
||||
# print("读取数据库成功:" + str(cols) + "列 " + str(rows) + "行")
|
||||
|
||||
for i in range(elim_rows,rows):
|
||||
tmp_list = [str(table.cell_value(i,j)) for j in range(0,cols)]
|
||||
if (int(float(tmp_list[0])) not in elim_id):
|
||||
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:
|
||||
if student.class_name not in classes:
|
||||
classes.append(student.class_name)
|
||||
if student.subject not in subjects:
|
||||
subjects.append(student.subject)
|
||||
|
||||
cur_name = StringVar()
|
||||
|
||||
def upd_name(name):
|
||||
cur_name.set(name)
|
||||
|
||||
upd_name("")
|
||||
|
||||
listbox = Listbox(gui, selectmode = MULTIPLE, height = 5)
|
||||
|
||||
for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
filter.append(classes[selection])
|
||||
# print(filter)
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
# print(student.name)
|
||||
cur_stu.append(student)
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
# 触发30%概率,从up中挑选
|
||||
if (random.randint(1,100) < up_percent and percent_override):
|
||||
protection_override = True;
|
||||
temp = []
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) in up_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
elif (random.randint(1,100) < down_persent and percent_override):
|
||||
protection_override = True;
|
||||
temp = [];
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) not in down_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
else:
|
||||
protection_override = False
|
||||
|
||||
if not cur_stu:
|
||||
protection_override = False
|
||||
sel_class(0)
|
||||
|
||||
choice = random.choice(cur_stu)
|
||||
# print(choice.name)
|
||||
counter = 0;
|
||||
while (last_choice == choice.name and (not protection_override)) or choice.id in elim_id:
|
||||
choice = random.choice(cur_stu)
|
||||
counter = counter + 1
|
||||
if counter >= 100:
|
||||
break
|
||||
# print(choice.name)
|
||||
upd_name(choice.name)
|
||||
class_label.config(text = choice.class_name)
|
||||
subject_label.config(text = choice.subject)
|
||||
last_choice = choice.name
|
||||
|
||||
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")
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
|
||||
class_label.grid(row = 2, column = 1, sticky = N+S+E+W)
|
||||
subject_label.grid(row = 2, column = 2, sticky = N+S+E+W)
|
||||
name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
|
||||
gui.mainloop()
|
||||
192
.history/点名器_20221107175744.pyw
Normal file
192
.history/点名器_20221107175744.pyw
Normal file
@@ -0,0 +1,192 @@
|
||||
import xlrd as excel
|
||||
from tkinter import *
|
||||
import tkinter.messagebox as msgbox
|
||||
import random
|
||||
import sys
|
||||
import win32con, win32api
|
||||
|
||||
gui_size = "620x200"
|
||||
|
||||
gui = Tk()
|
||||
|
||||
gui.withdraw()
|
||||
gui.title("点名器")
|
||||
gui.geometry(gui_size)
|
||||
gui.resizable(0,0)
|
||||
gui.configure(bg = "white")
|
||||
class Student(object):
|
||||
name = ""
|
||||
subject = ""
|
||||
id = ""
|
||||
class_name = ""
|
||||
|
||||
def __init__(self,id,class_name,subject,name):
|
||||
self.id = id
|
||||
self.class_name = class_name
|
||||
self.subject = subject
|
||||
self.name = name
|
||||
|
||||
protection_override = False
|
||||
up_percent = 30
|
||||
down_persent = 40
|
||||
filename = "names.xls"
|
||||
configname = "config.data"
|
||||
elim_rows = 1
|
||||
percent_override = True
|
||||
|
||||
try:
|
||||
excel_data = excel.open_workbook(filename)
|
||||
table = excel_data.sheets()[0]
|
||||
win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
except FileNotFoundError:
|
||||
msgbox.showerror('找不到数据库文件', '在相同目录下未能找到 names.xls 文件,请确认您的文件存在')
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
cols = table.ncols
|
||||
rows = table.nrows
|
||||
assert cols == 4
|
||||
assert rows > 1
|
||||
except AssertionError:
|
||||
msgbox.showerror('数据库文件格式不正确', '数据库文件内行/列数不合法,请确认数据库文件拥有超过1的行数和等于4的列数,当前行数:' + str(rows) + ' 当前列数:' + str(cols))
|
||||
sys.exit()
|
||||
|
||||
elim_id = []
|
||||
up_id = []
|
||||
down_id = []
|
||||
|
||||
try:
|
||||
with open(configname,'r') as file:
|
||||
win32api.SetFileAttributes(configname,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
config = file.read().splitlines()
|
||||
for unit in config:
|
||||
temp = unit.split(",")
|
||||
if temp[1] == '0':
|
||||
elim_id.append(int(temp[0]))
|
||||
elif temp[1] == '+':
|
||||
up_id.append(int(temp[0]))
|
||||
elif temp[1] == "-":
|
||||
down_id.append(int(temp[0]))
|
||||
else:
|
||||
pass
|
||||
except:
|
||||
percent_override = False
|
||||
|
||||
up_percent = len(up_id) * 5 if len(up_id) <= 6 else 30
|
||||
down_percent = len(down_id) * 8 if len(down_id) <= 5 else 40
|
||||
|
||||
gui.deiconify()
|
||||
|
||||
students = []
|
||||
classes = []
|
||||
subjects = []
|
||||
filter = []
|
||||
|
||||
last_choice = ""
|
||||
|
||||
# print("读取数据库成功:" + str(cols) + "列 " + str(rows) + "行")
|
||||
|
||||
for i in range(elim_rows,rows):
|
||||
tmp_list = [str(table.cell_value(i,j)) for j in range(0,cols)]
|
||||
if (int(float(tmp_list[0])) not in elim_id):
|
||||
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:
|
||||
if student.class_name not in classes:
|
||||
classes.append(student.class_name)
|
||||
if student.subject not in subjects:
|
||||
subjects.append(student.subject)
|
||||
|
||||
cur_name = StringVar()
|
||||
|
||||
def upd_name(name):
|
||||
cur_name.set(name)
|
||||
|
||||
upd_name("")
|
||||
|
||||
listbox = Listbox(gui, selectmode = MULTIPLE, height = 5)
|
||||
|
||||
for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
filter.append(classes[selection])
|
||||
# print(filter)
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
# print(student.name)
|
||||
cur_stu.append(student)
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
# 触发30%概率,从up中挑选
|
||||
if (random.randint(1,100) < up_percent and percent_override):
|
||||
protection_override = True;
|
||||
temp = []
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) in up_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
elif (random.randint(1,100) < down_persent and percent_override):
|
||||
protection_override = True;
|
||||
temp = [];
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) not in down_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
else:
|
||||
protection_override = False
|
||||
|
||||
if not cur_stu:
|
||||
protection_override = False
|
||||
sel_class(0)
|
||||
|
||||
choice = random.choice(cur_stu)
|
||||
# print(choice.name)
|
||||
counter = 0;
|
||||
while (last_choice == choice.name and (not protection_override)) or choice.id in elim_id:
|
||||
choice = random.choice(cur_stu)
|
||||
counter = counter + 1
|
||||
if counter >= 100:
|
||||
break
|
||||
# print(choice.name)
|
||||
upd_name(choice.name)
|
||||
class_label.config(text = choice.class_name)
|
||||
subject_label.config(text = choice.subject)
|
||||
last_choice = choice.name
|
||||
|
||||
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")
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
|
||||
class_label.grid(row = 2, column = 1, sticky = N+S+E+W)
|
||||
subject_label.grid(row = 2, column = 2, sticky = N+S+E+W)
|
||||
name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
|
||||
gui.mainloop()
|
||||
192
.history/点名器_20221107175745.pyw
Normal file
192
.history/点名器_20221107175745.pyw
Normal file
@@ -0,0 +1,192 @@
|
||||
import xlrd as excel
|
||||
from tkinter import *
|
||||
import tkinter.messagebox as msgbox
|
||||
import random
|
||||
import sys
|
||||
import win32con, win32api
|
||||
|
||||
gui_size = "620x200"
|
||||
|
||||
gui = Tk()
|
||||
|
||||
gui.withdraw()
|
||||
gui.title("点名器")
|
||||
gui.geometry(gui_size)
|
||||
gui.resizable(0,0)
|
||||
gui.configure(bg = "white")
|
||||
class Student(object):
|
||||
name = ""
|
||||
subject = ""
|
||||
id = ""
|
||||
class_name = ""
|
||||
|
||||
def __init__(self,id,class_name,subject,name):
|
||||
self.id = id
|
||||
self.class_name = class_name
|
||||
self.subject = subject
|
||||
self.name = name
|
||||
|
||||
protection_override = False
|
||||
up_percent = 30
|
||||
down_persent = 40
|
||||
filename = "names.xls"
|
||||
configname = "config.data"
|
||||
elim_rows = 1
|
||||
percent_override = True
|
||||
|
||||
try:
|
||||
excel_data = excel.open_workbook(filename)
|
||||
table = excel_data.sheets()[0]
|
||||
win32api.SetFileAttributes(filename,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
except FileNotFoundError:
|
||||
msgbox.showerror('找不到数据库文件', '在相同目录下未能找到 names.xls 文件,请确认您的文件存在')
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
cols = table.ncols
|
||||
rows = table.nrows
|
||||
assert cols == 4
|
||||
assert rows > 1
|
||||
except AssertionError:
|
||||
msgbox.showerror('数据库文件格式不正确', '数据库文件内行/列数不合法,请确认数据库文件拥有超过1的行数和等于4的列数,当前行数:' + str(rows) + ' 当前列数:' + str(cols))
|
||||
sys.exit()
|
||||
|
||||
elim_id = []
|
||||
up_id = []
|
||||
down_id = []
|
||||
|
||||
try:
|
||||
with open(configname,'r') as file:
|
||||
win32api.SetFileAttributes(configname,win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
config = file.read().splitlines()
|
||||
for unit in config:
|
||||
temp = unit.split(",")
|
||||
if temp[1] == '0':
|
||||
elim_id.append(int(temp[0]))
|
||||
elif temp[1] == '+':
|
||||
up_id.append(int(temp[0]))
|
||||
elif temp[1] == "-":
|
||||
down_id.append(int(temp[0]))
|
||||
else:
|
||||
pass
|
||||
except:
|
||||
percent_override = False
|
||||
|
||||
up_percent = len(up_id) * 5 if len(up_id) <= 6 else 30
|
||||
down_percent = len(down_id) * 8 if len(down_id) <= 5 else 40
|
||||
|
||||
gui.deiconify()
|
||||
|
||||
students = []
|
||||
classes = []
|
||||
subjects = []
|
||||
filter = []
|
||||
|
||||
last_choice = ""
|
||||
|
||||
# print("读取数据库成功:" + str(cols) + "列 " + str(rows) + "行")
|
||||
|
||||
for i in range(elim_rows,rows):
|
||||
tmp_list = [str(table.cell_value(i,j)) for j in range(0,cols)]
|
||||
if (int(float(tmp_list[0])) not in elim_id):
|
||||
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:
|
||||
if student.class_name not in classes:
|
||||
classes.append(student.class_name)
|
||||
if student.subject not in subjects:
|
||||
subjects.append(student.subject)
|
||||
|
||||
cur_name = StringVar()
|
||||
|
||||
def upd_name(name):
|
||||
cur_name.set(name)
|
||||
|
||||
upd_name("")
|
||||
|
||||
listbox = Listbox(gui, selectmode = MULTIPLE, height = 5)
|
||||
|
||||
for tmp_class in classes:
|
||||
listbox.insert("end",tmp_class)
|
||||
|
||||
def sel_class(flag = 1):
|
||||
global filter, listbox, classes, cur_stu, students
|
||||
filter.clear()
|
||||
for selection in listbox.curselection():
|
||||
# print(selection)
|
||||
filter.append(classes[selection])
|
||||
# print(filter)
|
||||
if filter:
|
||||
if flag:
|
||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||
cur_stu.clear()
|
||||
for student in students:
|
||||
if student.class_name in filter:
|
||||
# print(student.name)
|
||||
cur_stu.append(student)
|
||||
else:
|
||||
if flag:
|
||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||
filter = classes[:]
|
||||
cur_stu = students[:]
|
||||
|
||||
def choose():
|
||||
global last_choice, cur_stu
|
||||
sel_class(0)
|
||||
# 触发30%概率,从up中挑选
|
||||
if (random.randint(1,100) < up_percent and percent_override):
|
||||
protection_override = True;
|
||||
temp = []
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) in up_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
elif (random.randint(1,100) < down_persent and percent_override):
|
||||
protection_override = True;
|
||||
temp = [];
|
||||
for student in cur_stu:
|
||||
if int(float(student.id)) not in down_id:
|
||||
temp.append(student)
|
||||
cur_stu = temp[:]
|
||||
else:
|
||||
protection_override = False
|
||||
|
||||
if not cur_stu:
|
||||
protection_override = False
|
||||
sel_class(0)
|
||||
|
||||
choice = random.choice(cur_stu)
|
||||
# print(choice.name)
|
||||
counter = 0;
|
||||
while (last_choice == choice.name and (not protection_override)) or choice.id in elim_id:
|
||||
choice = random.choice(cur_stu)
|
||||
counter = counter + 1
|
||||
if counter >= 100:
|
||||
break
|
||||
# print(choice.name)
|
||||
upd_name(choice.name)
|
||||
class_label.config(text = choice.class_name)
|
||||
subject_label.config(text = choice.subject)
|
||||
last_choice = choice.name
|
||||
|
||||
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")
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
|
||||
class_label.grid(row = 2, column = 1, sticky = N+S+E+W)
|
||||
subject_label.grid(row = 2, column = 2, sticky = N+S+E+W)
|
||||
name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
|
||||
gui.mainloop()
|
||||
3330
build/点名器/Analysis-00.toc
Normal file
3330
build/点名器/Analysis-00.toc
Normal file
File diff suppressed because it is too large
Load Diff
2998
build/点名器/EXE-00.toc
Normal file
2998
build/点名器/EXE-00.toc
Normal file
File diff suppressed because it is too large
Load Diff
2991
build/点名器/PKG-00.toc
Normal file
2991
build/点名器/PKG-00.toc
Normal file
File diff suppressed because it is too large
Load Diff
BIN
build/点名器/PYZ-00.pyz
Normal file
BIN
build/点名器/PYZ-00.pyz
Normal file
Binary file not shown.
358
build/点名器/PYZ-00.toc
Normal file
358
build/点名器/PYZ-00.toc
Normal file
@@ -0,0 +1,358 @@
|
||||
('C:\\Users\\peter\\OneDrive\\桌面\\点名器\\build\\点名器\\PYZ-00.pyz',
|
||||
[('subprocess',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\subprocess.py',
|
||||
'PYMODULE'),
|
||||
('selectors',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\selectors.py',
|
||||
'PYMODULE'),
|
||||
('contextlib',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\contextlib.py',
|
||||
'PYMODULE'),
|
||||
('threading',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\threading.py',
|
||||
'PYMODULE'),
|
||||
('_threading_local',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\_threading_local.py',
|
||||
'PYMODULE'),
|
||||
('signal',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\signal.py',
|
||||
'PYMODULE'),
|
||||
('_strptime',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\_strptime.py',
|
||||
'PYMODULE'),
|
||||
('datetime',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\datetime.py',
|
||||
'PYMODULE'),
|
||||
('calendar',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\calendar.py',
|
||||
'PYMODULE'),
|
||||
('argparse',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\argparse.py',
|
||||
'PYMODULE'),
|
||||
('textwrap',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\textwrap.py',
|
||||
'PYMODULE'),
|
||||
('shutil',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\shutil.py',
|
||||
'PYMODULE'),
|
||||
('zipfile',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\zipfile.py',
|
||||
'PYMODULE'),
|
||||
('py_compile',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\py_compile.py',
|
||||
'PYMODULE'),
|
||||
('importlib.machinery',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\machinery.py',
|
||||
'PYMODULE'),
|
||||
('importlib',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('importlib._bootstrap',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\_bootstrap.py',
|
||||
'PYMODULE'),
|
||||
('importlib._bootstrap_external',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\_bootstrap_external.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\metadata\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('typing',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\typing.py',
|
||||
'PYMODULE'),
|
||||
('importlib.abc',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\abc.py',
|
||||
'PYMODULE'),
|
||||
('importlib.resources.abc',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\resources\\abc.py',
|
||||
'PYMODULE'),
|
||||
('importlib.resources',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\resources\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('importlib.resources._legacy',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\resources\\_legacy.py',
|
||||
'PYMODULE'),
|
||||
('importlib.resources._common',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\resources\\_common.py',
|
||||
'PYMODULE'),
|
||||
('importlib.resources._adapters',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\resources\\_adapters.py',
|
||||
'PYMODULE'),
|
||||
('tempfile',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\tempfile.py',
|
||||
'PYMODULE'),
|
||||
('importlib._abc',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\_abc.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._itertools',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\metadata\\_itertools.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._functools',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\metadata\\_functools.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._collections',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\metadata\\_collections.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._meta',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\metadata\\_meta.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._adapters',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\metadata\\_adapters.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._text',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\metadata\\_text.py',
|
||||
'PYMODULE'),
|
||||
('email.message',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\message.py',
|
||||
'PYMODULE'),
|
||||
('email.policy',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\policy.py',
|
||||
'PYMODULE'),
|
||||
('email.contentmanager',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\contentmanager.py',
|
||||
'PYMODULE'),
|
||||
('email.quoprimime',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\quoprimime.py',
|
||||
'PYMODULE'),
|
||||
('string',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\string.py',
|
||||
'PYMODULE'),
|
||||
('email.headerregistry',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\headerregistry.py',
|
||||
'PYMODULE'),
|
||||
('email._header_value_parser',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\_header_value_parser.py',
|
||||
'PYMODULE'),
|
||||
('email.iterators',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\iterators.py',
|
||||
'PYMODULE'),
|
||||
('email.generator',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\generator.py',
|
||||
'PYMODULE'),
|
||||
('email._encoded_words',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\_encoded_words.py',
|
||||
'PYMODULE'),
|
||||
('base64',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\base64.py',
|
||||
'PYMODULE'),
|
||||
('getopt',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\getopt.py',
|
||||
'PYMODULE'),
|
||||
('email.charset',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\charset.py',
|
||||
'PYMODULE'),
|
||||
('email.encoders',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\encoders.py',
|
||||
'PYMODULE'),
|
||||
('email.base64mime',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\base64mime.py',
|
||||
'PYMODULE'),
|
||||
('email._policybase',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\_policybase.py',
|
||||
'PYMODULE'),
|
||||
('email.header',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\header.py',
|
||||
'PYMODULE'),
|
||||
('email.errors',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\errors.py',
|
||||
'PYMODULE'),
|
||||
('email.utils',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\utils.py',
|
||||
'PYMODULE'),
|
||||
('email._parseaddr',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\_parseaddr.py',
|
||||
'PYMODULE'),
|
||||
('socket',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\socket.py',
|
||||
'PYMODULE'),
|
||||
('quopri',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\quopri.py',
|
||||
'PYMODULE'),
|
||||
('email',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('email.parser',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\parser.py',
|
||||
'PYMODULE'),
|
||||
('email.feedparser',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\email\\feedparser.py',
|
||||
'PYMODULE'),
|
||||
('csv',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\csv.py',
|
||||
'PYMODULE'),
|
||||
('importlib.readers',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\readers.py',
|
||||
'PYMODULE'),
|
||||
('importlib.resources.readers',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\resources\\readers.py',
|
||||
'PYMODULE'),
|
||||
('importlib.resources._itertools',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\resources\\_itertools.py',
|
||||
'PYMODULE'),
|
||||
('struct',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\struct.py',
|
||||
'PYMODULE'),
|
||||
('importlib.util',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\importlib\\util.py',
|
||||
'PYMODULE'),
|
||||
('tarfile',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\tarfile.py',
|
||||
'PYMODULE'),
|
||||
('gzip',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\gzip.py',
|
||||
'PYMODULE'),
|
||||
('_compression',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\_compression.py',
|
||||
'PYMODULE'),
|
||||
('lzma',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\lzma.py',
|
||||
'PYMODULE'),
|
||||
('bz2',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\bz2.py',
|
||||
'PYMODULE'),
|
||||
('copy',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\copy.py',
|
||||
'PYMODULE'),
|
||||
('gettext',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\gettext.py',
|
||||
'PYMODULE'),
|
||||
('inspect',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\inspect.py',
|
||||
'PYMODULE'),
|
||||
('dis',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\dis.py',
|
||||
'PYMODULE'),
|
||||
('opcode',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\opcode.py',
|
||||
'PYMODULE'),
|
||||
('ast',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\ast.py',
|
||||
'PYMODULE'),
|
||||
('stringprep',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\stringprep.py',
|
||||
'PYMODULE'),
|
||||
('tracemalloc',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\tracemalloc.py',
|
||||
'PYMODULE'),
|
||||
('pickle',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\pickle.py',
|
||||
'PYMODULE'),
|
||||
('pprint',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\pprint.py',
|
||||
'PYMODULE'),
|
||||
('dataclasses',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\dataclasses.py',
|
||||
'PYMODULE'),
|
||||
('_compat_pickle',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\_compat_pickle.py',
|
||||
'PYMODULE'),
|
||||
('getpass',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\getpass.py',
|
||||
'PYMODULE'),
|
||||
('nturl2path',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\nturl2path.py',
|
||||
'PYMODULE'),
|
||||
('ftplib',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\ftplib.py',
|
||||
'PYMODULE'),
|
||||
('netrc',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\netrc.py',
|
||||
'PYMODULE'),
|
||||
('shlex',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\shlex.py',
|
||||
'PYMODULE'),
|
||||
('mimetypes',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\mimetypes.py',
|
||||
'PYMODULE'),
|
||||
('http.cookiejar',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\http\\cookiejar.py',
|
||||
'PYMODULE'),
|
||||
('http',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\http\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('logging',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\logging\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('ssl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\ssl.py',
|
||||
'PYMODULE'),
|
||||
('http.client',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\http\\client.py',
|
||||
'PYMODULE'),
|
||||
('hashlib',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\hashlib.py',
|
||||
'PYMODULE'),
|
||||
('bisect',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\bisect.py',
|
||||
'PYMODULE'),
|
||||
('_py_abc',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\_py_abc.py',
|
||||
'PYMODULE'),
|
||||
('win32con',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\win32\\lib\\win32con.py',
|
||||
'PYMODULE'),
|
||||
('random',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\random.py',
|
||||
'PYMODULE'),
|
||||
('statistics',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\statistics.py',
|
||||
'PYMODULE'),
|
||||
('decimal',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\decimal.py',
|
||||
'PYMODULE'),
|
||||
('_pydecimal',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\_pydecimal.py',
|
||||
'PYMODULE'),
|
||||
('contextvars',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\contextvars.py',
|
||||
'PYMODULE'),
|
||||
('fractions',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\fractions.py',
|
||||
'PYMODULE'),
|
||||
('numbers',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\numbers.py',
|
||||
'PYMODULE'),
|
||||
('tkinter.messagebox',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\tkinter\\messagebox.py',
|
||||
'PYMODULE'),
|
||||
('tkinter.commondialog',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\tkinter\\commondialog.py',
|
||||
'PYMODULE'),
|
||||
('tkinter',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\tkinter\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('tkinter.constants',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\tkinter\\constants.py',
|
||||
'PYMODULE'),
|
||||
('xlrd',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\xlrd\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('xlrd.xldate',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\xlrd\\xldate.py',
|
||||
'PYMODULE'),
|
||||
('xlrd.info',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\xlrd\\info.py',
|
||||
'PYMODULE'),
|
||||
('xlrd.formula',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\xlrd\\formula.py',
|
||||
'PYMODULE'),
|
||||
('__future__',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\__future__.py',
|
||||
'PYMODULE'),
|
||||
('xlrd.book',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\xlrd\\book.py',
|
||||
'PYMODULE'),
|
||||
('xlrd.sheet',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\xlrd\\sheet.py',
|
||||
'PYMODULE'),
|
||||
('xlrd.formatting',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\xlrd\\formatting.py',
|
||||
'PYMODULE'),
|
||||
('xlrd.compdoc',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\xlrd\\compdoc.py',
|
||||
'PYMODULE'),
|
||||
('xlrd.biffh',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\xlrd\\biffh.py',
|
||||
'PYMODULE'),
|
||||
('xlrd.timemachine',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\xlrd\\timemachine.py',
|
||||
'PYMODULE')])
|
||||
2494
build/点名器/Tree-00.toc
Normal file
2494
build/点名器/Tree-00.toc
Normal file
File diff suppressed because it is too large
Load Diff
265
build/点名器/Tree-01.toc
Normal file
265
build/点名器/Tree-01.toc
Normal file
@@ -0,0 +1,265 @@
|
||||
('C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6',
|
||||
'tk',
|
||||
['demos', '*.lib', 'tkConfig.sh'],
|
||||
'DATA',
|
||||
[('tk\\bgerror.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\bgerror.tcl',
|
||||
'DATA'),
|
||||
('tk\\button.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\button.tcl',
|
||||
'DATA'),
|
||||
('tk\\choosedir.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\choosedir.tcl',
|
||||
'DATA'),
|
||||
('tk\\clrpick.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\clrpick.tcl',
|
||||
'DATA'),
|
||||
('tk\\comdlg.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\comdlg.tcl',
|
||||
'DATA'),
|
||||
('tk\\console.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\console.tcl',
|
||||
'DATA'),
|
||||
('tk\\dialog.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\dialog.tcl',
|
||||
'DATA'),
|
||||
('tk\\entry.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\entry.tcl',
|
||||
'DATA'),
|
||||
('tk\\focus.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\focus.tcl',
|
||||
'DATA'),
|
||||
('tk\\fontchooser.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\fontchooser.tcl',
|
||||
'DATA'),
|
||||
('tk\\iconlist.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\iconlist.tcl',
|
||||
'DATA'),
|
||||
('tk\\icons.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\icons.tcl',
|
||||
'DATA'),
|
||||
('tk\\license.terms',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\license.terms',
|
||||
'DATA'),
|
||||
('tk\\listbox.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\listbox.tcl',
|
||||
'DATA'),
|
||||
('tk\\megawidget.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\megawidget.tcl',
|
||||
'DATA'),
|
||||
('tk\\menu.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\menu.tcl',
|
||||
'DATA'),
|
||||
('tk\\mkpsenc.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\mkpsenc.tcl',
|
||||
'DATA'),
|
||||
('tk\\msgbox.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgbox.tcl',
|
||||
'DATA'),
|
||||
('tk\\obsolete.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\obsolete.tcl',
|
||||
'DATA'),
|
||||
('tk\\optMenu.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\optMenu.tcl',
|
||||
'DATA'),
|
||||
('tk\\palette.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\palette.tcl',
|
||||
'DATA'),
|
||||
('tk\\panedwindow.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\panedwindow.tcl',
|
||||
'DATA'),
|
||||
('tk\\pkgIndex.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\pkgIndex.tcl',
|
||||
'DATA'),
|
||||
('tk\\safetk.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\safetk.tcl',
|
||||
'DATA'),
|
||||
('tk\\scale.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\scale.tcl',
|
||||
'DATA'),
|
||||
('tk\\scrlbar.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\scrlbar.tcl',
|
||||
'DATA'),
|
||||
('tk\\spinbox.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\spinbox.tcl',
|
||||
'DATA'),
|
||||
('tk\\tclIndex',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\tclIndex',
|
||||
'DATA'),
|
||||
('tk\\tearoff.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\tearoff.tcl',
|
||||
'DATA'),
|
||||
('tk\\text.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\text.tcl',
|
||||
'DATA'),
|
||||
('tk\\tk.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\tk.tcl',
|
||||
'DATA'),
|
||||
('tk\\tkfbox.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\tkfbox.tcl',
|
||||
'DATA'),
|
||||
('tk\\unsupported.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\unsupported.tcl',
|
||||
'DATA'),
|
||||
('tk\\xmfbox.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\xmfbox.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\altTheme.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\altTheme.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\aquaTheme.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\aquaTheme.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\button.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\button.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\clamTheme.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\clamTheme.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\classicTheme.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\classicTheme.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\combobox.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\combobox.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\cursors.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\cursors.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\defaults.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\defaults.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\entry.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\entry.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\fonts.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\fonts.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\menubutton.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\menubutton.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\notebook.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\notebook.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\panedwindow.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\panedwindow.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\progress.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\progress.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\scale.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\scale.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\scrollbar.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\scrollbar.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\sizegrip.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\sizegrip.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\spinbox.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\spinbox.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\treeview.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\treeview.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\ttk.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\ttk.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\utils.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\utils.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\vistaTheme.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\vistaTheme.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\winTheme.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\winTheme.tcl',
|
||||
'DATA'),
|
||||
('tk\\ttk\\xpTheme.tcl',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\ttk\\xpTheme.tcl',
|
||||
'DATA'),
|
||||
('tk\\msgs\\cs.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\cs.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\da.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\da.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\de.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\de.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\el.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\el.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\en.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\en.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\en_gb.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\en_gb.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\eo.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\eo.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\es.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\es.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\fr.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\fr.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\hu.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\hu.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\it.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\it.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\nl.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\nl.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\pl.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\pl.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\pt.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\pt.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\ru.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\ru.msg',
|
||||
'DATA'),
|
||||
('tk\\msgs\\sv.msg',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\msgs\\sv.msg',
|
||||
'DATA'),
|
||||
('tk\\images\\logo.eps',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\logo.eps',
|
||||
'DATA'),
|
||||
('tk\\images\\logo100.gif',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\logo100.gif',
|
||||
'DATA'),
|
||||
('tk\\images\\logo64.gif',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\logo64.gif',
|
||||
'DATA'),
|
||||
('tk\\images\\logoLarge.gif',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\logoLarge.gif',
|
||||
'DATA'),
|
||||
('tk\\images\\logoMed.gif',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\logoMed.gif',
|
||||
'DATA'),
|
||||
('tk\\images\\pwrdLogo.eps',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\pwrdLogo.eps',
|
||||
'DATA'),
|
||||
('tk\\images\\pwrdLogo100.gif',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\pwrdLogo100.gif',
|
||||
'DATA'),
|
||||
('tk\\images\\pwrdLogo150.gif',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\pwrdLogo150.gif',
|
||||
'DATA'),
|
||||
('tk\\images\\pwrdLogo175.gif',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\pwrdLogo175.gif',
|
||||
'DATA'),
|
||||
('tk\\images\\pwrdLogo200.gif',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\pwrdLogo200.gif',
|
||||
'DATA'),
|
||||
('tk\\images\\pwrdLogo75.gif',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\pwrdLogo75.gif',
|
||||
'DATA'),
|
||||
('tk\\images\\README',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\README',
|
||||
'DATA'),
|
||||
('tk\\images\\tai-ku.gif',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tk8.6\\images\\tai-ku.gif',
|
||||
'DATA')])
|
||||
19
build/点名器/Tree-02.toc
Normal file
19
build/点名器/Tree-02.toc
Normal file
@@ -0,0 +1,19 @@
|
||||
('C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tcl8.6\\..\\tcl8',
|
||||
'tcl8',
|
||||
[],
|
||||
'DATA',
|
||||
[('tcl8\\8.6\\http-2.9.5.tm',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tcl8.6\\..\\tcl8\\8.6\\http-2.9.5.tm',
|
||||
'DATA'),
|
||||
('tcl8\\8.5\\msgcat-1.6.1.tm',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tcl8.6\\..\\tcl8\\8.5\\msgcat-1.6.1.tm',
|
||||
'DATA'),
|
||||
('tcl8\\8.5\\tcltest-2.5.3.tm',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tcl8.6\\..\\tcl8\\8.5\\tcltest-2.5.3.tm',
|
||||
'DATA'),
|
||||
('tcl8\\8.4\\platform-1.0.18.tm',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tcl8.6\\..\\tcl8\\8.4\\platform-1.0.18.tm',
|
||||
'DATA'),
|
||||
('tcl8\\8.4\\platform\\shell-1.1.4.tm',
|
||||
'C:\\Users\\peter\\AppData\\Local\\Programs\\Python\\Python311\\tcl\\tcl8.6\\..\\tcl8\\8.4\\platform\\shell-1.1.4.tm',
|
||||
'DATA')])
|
||||
BIN
build/点名器/base_library.zip
Normal file
BIN
build/点名器/base_library.zip
Normal file
Binary file not shown.
BIN
build/点名器/localpycs/pyimod01_archive.pyc
Normal file
BIN
build/点名器/localpycs/pyimod01_archive.pyc
Normal file
Binary file not shown.
BIN
build/点名器/localpycs/pyimod02_importers.pyc
Normal file
BIN
build/点名器/localpycs/pyimod02_importers.pyc
Normal file
Binary file not shown.
BIN
build/点名器/localpycs/pyimod03_ctypes.pyc
Normal file
BIN
build/点名器/localpycs/pyimod03_ctypes.pyc
Normal file
Binary file not shown.
BIN
build/点名器/localpycs/pyimod04_pywin32.pyc
Normal file
BIN
build/点名器/localpycs/pyimod04_pywin32.pyc
Normal file
Binary file not shown.
BIN
build/点名器/localpycs/struct.pyc
Normal file
BIN
build/点名器/localpycs/struct.pyc
Normal file
Binary file not shown.
30
build/点名器/warn-点名器.txt
Normal file
30
build/点名器/warn-点名器.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
This file lists modules PyInstaller was not able to find. This does not
|
||||
necessarily mean this module is required for running your program. Python and
|
||||
Python 3rd-party packages include a lot of conditional or optional modules. For
|
||||
example the module 'ntpath' only exists on Windows, whereas the module
|
||||
'posixpath' only exists on Posix systems.
|
||||
|
||||
Types if import:
|
||||
* top-level: imported at the top-level - look at these first
|
||||
* conditional: imported within an if-statement
|
||||
* delayed: imported within a function
|
||||
* optional: imported within a try-except-statement
|
||||
|
||||
IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
|
||||
tracking down the missing module yourself. Thanks!
|
||||
|
||||
missing module named pwd - imported by posixpath (delayed, conditional, optional), shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional), netrc (delayed, conditional), getpass (delayed)
|
||||
missing module named grp - imported by shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional)
|
||||
missing module named _posixsubprocess - imported by subprocess (conditional)
|
||||
missing module named fcntl - imported by subprocess (optional)
|
||||
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional)
|
||||
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional)
|
||||
missing module named posix - imported by os (conditional, optional), posixpath (optional), shutil (conditional), importlib._bootstrap_external (conditional)
|
||||
missing module named resource - imported by posix (top-level)
|
||||
missing module named 'org.python' - imported by copy (optional)
|
||||
missing module named org - imported by pickle (optional)
|
||||
missing module named _scproxy - imported by urllib.request (conditional)
|
||||
missing module named termios - imported by getpass (optional)
|
||||
missing module named cStringIO - imported by xlrd.timemachine (conditional)
|
||||
missing module named copy_reg - imported by cStringIO (top-level)
|
||||
8064
build/点名器/xref-点名器.html
Normal file
8064
build/点名器/xref-点名器.html
Normal file
File diff suppressed because it is too large
Load Diff
30
build/点名器/点名器.exe.manifest
Normal file
30
build/点名器/点名器.exe.manifest
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity type="win32" name="点名器" processorArchitecture="amd64" version="1.0.0.0"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" language="*" processorArchitecture="*" version="6.0.0.0" publicKeyToken="6595b64144ccf1df"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
</assembly>
|
||||
BIN
build/点名器/点名器.pkg
Normal file
BIN
build/点名器/点名器.pkg
Normal file
Binary file not shown.
BIN
dist/点名器.exe
vendored
Normal file
BIN
dist/点名器.exe
vendored
Normal file
Binary file not shown.
44
点名器.spec
Normal file
44
点名器.spec
Normal file
@@ -0,0 +1,44 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['点名器.pyw'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False,
|
||||
)
|
||||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='点名器',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
||||
Reference in New Issue
Block a user