之前刷到一个视频,老师上课点到用系统点到回答问题,然后就点名结束了。相信很多学校现在也会玩这招吧,今天就用Python给大家做一个点名系统。来吧,展示…
一.准备工作
1.Tkinter
Tkinter 是 python 内置的 TK GUI 工具集。TK 是 Tcl 语言的原生 GUI 库。作为 python 的图形设计工具,它所使用的 Tcl 语言环境已经完全嵌入到了 python 解释器中。
我们使用Tkinter开发GUI界面。
2.PIL
PIL(Python Image Library)库是Python语言的第三方库,需要通过pip工具安装。安装PIL库的方法如下,需要注意,安装库的名字是pillow。
PIL库支持图像储存、显示和处理,他能够处理几乎所有图片格式,可以完成对图像的缩放、剪裁、叠加以及向图像添加线条、图像和文字等操作。
使用PIL中的Image,ImageTk处理、引入一张图片,可以使用下面代码安装一下。
pip install pillow
二.预览
1.启动
双击打开后,进入软件主界面,所有功能一目了然。程序会自动识别软件目录下的names.txt,将里面的名字导入。
2.开始点名-顺序点名
选择顺序点名后,点击开始,屏幕上就开始滚动出现人名,人名出现的概率是相同的,点击停止,人名就停止滚动,点名结束。
3.开始点名-随机点名
点击随机点名,程序就会进行随机点名,人名出现的概率是随机的。
4.手动加载人名单
可以自己手动选择人名单,前提是人名单格式为txt,且每个名字占一行。
5.开始点名-顺序点名-Pyqt5版本
用Pyqt5也写了一个版本,实现逻辑与TK版本相同,界面可能更好看了一些,但是文件大了许多,大家可以在后面总结部分自取。
三.思路
1.整体实现思路
2.点名实现思路
四.源代码
Python学习交流Q群:906715085####import randomimport reimport timeimport threadingfrom tkinter import *from tkinter import ttkfrom base64 import b64decodefrom PIL import Image,ImageTkfrom tkinter import messageboxfrom tkinter.filedialog importaskopenfilename""""-11-10点名/抽奖程序主要亮点:1.两种模式:①顺序点名②随机点名2.自动识别人名单3.支持手动导入人名单4.人名单导入校验5.人名显示位置自动矫正6.最多显示五个大字"""imgs=['./point_name.png']class APP: def __init__(self): self.root = Tk() self.running_flag=False #开始标志 self.time_span=0.05 #名字显示间隔 self.root.title('Point_name-V1.0')width = 680 height = 350 left = (self.root.winfo_screenwidth() - width) / 2top = (self.root.winfo_screenheight() - height) / 2 self.root.geometry("%dx%d+%d+%d"% (width, height, left, top)) self.root.resizable(0,0)self.create_widget() self.set_widget() self.place_widget() self.root.mainloop()def create_widget(self): self.label_show_name_var=StringVar() self.label_show_name=ttk.Label(self.root,textvariable=self.label_show_name_var,font=('Arial', 100,"bold"),foreground = '#1E90FF')self.btn_start=ttk.Button(self.root,text="开始",) self.btn_load_names=ttk.Button(self.root,text="手动加载人名单",) self.lf1=ttk.LabelFrame(self.root,text="点名方式") self.radioBtn_var=IntVar() self.radioBtn_var.set(1) self.radioBtn_sequence=ttk.Radiobutton(self.lf1,text="顺序点名",variable=self.radioBtn_var, value=1) self.radioBtn_random=ttk.Radiobutton(self.lf1,text="随机点名",variable=self.radioBtn_var, value=2) self.label_show_name_num=ttk.Label(self.root,font=('Arial', 20),foreground = '#FF7F50') paned = PanedWindow(self.root)self.img = imgs img_=b'iVBORw0KGgoAAAANSUhEUgAAALQAAAB4CAIAAADUhU+qAAAACXBIWXMAAAsTAAALEwEAmpwYAAAgAElEQVR4nO196XNbx5Vvd9+LfSU2EgD3fRNJbZRkyVJseY9sP7scOy+ZTCqpVKXm8/wp+TA1X2amJjWZSXksy1Ik27IsWXIsRpK1kCIpLgBJkAAXrMQO3K3fh0O0rkBKkaONzvOJSwGBu3b/+uznNKaUoh/oyZB6bDHG2+RSD0/807mNmth7ql/ymbz8EyL2LvdbeH/bC245bk+UHgQOSik8x8O85P0eHb5XX4pSSghRX7Pq+nAwxhi+3zwWlFJFURBC7Dr3G68tv3/0UYYnZC91P8IYw3NSSjmO23zTv/okbPTYaz7NlXMXHJtf+AHTw05hn9kxVaewi9AKVX2z+Sz1uQ+4KaVUlmVUGTIGvs2j/52e/6/SZlg/4PqKokiSVPWQD39TgFfVuD1tzgGvUbWg2dPcj7b8VT09DAQIIVmWy+VyqVSSZVl9I/bmWq1Wr9drNJrNs7uZtbAVqYbFlkey5atmXewF1S/7kC+oZlqMC255uqIo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fPnT548KYiiJMuE48CbhTFRFAVRmSM84TRUoRhKCDjursigaMMEraSQYoIRogBnrFS2tpRkpNIzvqfsY/uCQ02KohSLxWw2C+WNqFJUyAqUFUVWqKzICrjFRkZGYH9oaPh0b48eqVgqrK6unjt3ThCFjU3/FBlTTAiliAIaONAzMKaKQplOitBdpRepvKWVD4QQjVajN+hz+QL6XqgVDyRekqVn/Qz3pQ2GQZWyUM7msphgm92m0fIKVWRZ3ghzKAj0BJD+iqIIolgWBKvNZnfUEI5QpFBEMMZwGCYYEwVhiRIZUyQpgkJFTBBVkILljZCKBhENorKMiCwjUZAo+MEQYlFacJZTvKFXQEiQEEJ4LTEYdbwWK1SQZFGSZXiXeznH9wM2/w8z07TIub6ABQAAAABJRU5ErkJggg=='the_img = b64decode(img_)#将图片硬编码到GUI paned.image = ImageTk.PhotoImage(data=the_img) self._img = Label(self.root, image=paned.image,background='black')def set_widget(self):default_name_="会是谁?" self.label_show_name_var.set(default_name_) self.label_show_name_adjust(default_name_) self.btn_start.config(command=lambda :self.thread_it(self.start_point_name))self.btn_load_names.config(command=self.load_names) init_names=self.load_names_txt("./names.txt") self.root.protocol('WM_DELETE_WINDOW',self.quit_window) self.root.bind('<Escape>',self.quit_window) if init_names:self.default_names=init_names #1.文件存在但是无内容。2.文件不存在 self.label_show_name_num.config(text=f"一共加载了{len(self.default_names)}个姓名") else: self.btn_start.config(state=DISABLED) self.label_show_name_num.config(text=f"请先手动导入人名单!")def place_widget(self): self.lf1.place(x=300,y=160,width=250,height=50) self.radioBtn_sequence.place(x=20,y=0) self.radioBtn_random.place(x=150,y=0) self.btn_start.place(x=300,y=220,width=100,height=30) self.btn_load_names.place(x=450,y=220,width=100,height=30) self._img.place(x=90, y=165, height=120, width=180) self.label_show_name_num.place(x=300,y=260)def label_show_name_adjust(self,the_name): if len (the_name)==1: self.label_show_name.place(x=280, y=10) elif len(the_name) == 2: self.label_show_name.place(x=180, y=10) elif len(the_name) == 3: self.label_show_name.place(x=120, y=10) elif len(the_name) == 4: self.label_show_name.place(x=80, y=10) else: self.label_show_name.place(x=0, y=10)def start_point_name(self):"""启动之前进行判断,获取点名模式:return: """ if len(self.default_names)==1: messagebox.showinfo("提示",'人名单就一个人,不用选了!') self.label_show_name_var.set(self.default_names[0]) self.label_show_name_adjust(self.default_names[0]) return if self.btn_start["text"]=="开始": self.btn_load_names.config(state=DISABLED) self.running_flag=True if isinstance(self.default_names,list):self.btn_start.config(text="就你了") if self.radioBtn_var.get()==1: mode="sequence"elif self.radioBtn_var.get()==2:mode="random"else: passself.thread_it(self.point_name_begin(mode))else:messagebox.showwarning("警告","请先导入人名单!") else:self.running_flag=False self.btn_load_names.config(state=NORMAL) self.btn_start.config(text="开始")def point_name_begin(self,mode): """ 开始点名,点名主函数 :param mode: :return: """ if mode == "sequence": if self.running_flag: self.always_ergodic() elif mode=="random":while True: if self.running_flag: random_choice_name=random.choice(self.default_names) self.label_show_name_var.set(random_choice_name) self.label_show_name_adjust(random_choice_name) time.sleep(self.time_span) else: breakdef always_ergodic(self):""" 一直遍历此列表,使用死循环会造成线程阻塞 :return: """ for i in self.default_names: if self.running_flag:self.label_show_name_var.set(i)self.label_show_name_adjust(i)time.sleep(self.time_span)if i==self.default_names[-1]:self.always_ergodic() else:break def load_names(self):""" 手动加载txt格式人名单 :return: """ filename = askopenfilename(filetypes = [('文本文件', '.TXT'), ], title = "选择一个文本文件", initialdir="./")if filename: names=self.load_names_txt(filename) if names:self.default_names=namesno_Chinese_name_num=len([n for n in names if not self.load_name_check(n)])if no_Chinese_name_num==0: pass else: messagebox.showwarning("请注意",f'导入名单有{no_Chinese_name_num}个不是中文名字') self.label_show_name_num.config(text=f"一共加载了{len(self.default_names)}个姓名")default_name_ = "会是谁?"self.label_show_name_var.set(default_name_)self.label_show_name_adjust(default_name_)self.btn_start.config(state=NORMAL) else:messagebox.showwarning("警告","导入失败,请检查!")def load_names_txt(self,txt_file): """ 读取txt格式的人名单 :param txt_file: :return:"""try: with open(txt_file,'r',encoding="utf-8")as f:names=[name.strip() for name in f.readlines()] if len(names)==0: return False else:return names except: return Falsedef load_name_check(self,name): """ 对txt文本中的人名进行校验 中文汉字->True 非中文汉字->False :param name: :return:""" regex = r'[\u4e00-\u9fa5]+'if re.match(regex,name): return True else:return Falsedef thread_it(self,func,*args): t=threading.Thread(target=func,args=args) t.setDaemon(True)t.start()def quit_window(self,*args):""" 程序退出触发此函数 :param args: :return:"""ret=messagebox.askyesno('退出','确定要退出?') if ret:self.root.destroy()if __name__ == '__main__': a=APP()
五.总结
本次使用Tkinter开发了一款上课点名程序,此程序可以用于点名、抽奖…代码不到200行,程序简单又实用,主要有以下六个亮点:
1.两种模式:
•顺序点名
•随机点名
2.自动识别人名单
3.支持手动导入人名单
4.人名单导入校验
5.人名显示位置自动矫正
6.最多显示五个大字
最后,到这里就给大家把这个点名系统做好了,感兴趣的小伙伴可以直接拿代码去练手,看在码代码那么辛苦的份上,给一个大大的赞吧,下一章见。
如果觉得《如何用Python写一个上课点名系统》对你有帮助,请点赞、收藏,并留下你的观点哦!