资源简介
以python为基础的学生管理系统,运用tkinter打造的高端大气上档次的界面,操作简单,功能齐全,是练习的不二选择。
内含三个角色:学生,教师,管理员。
包括三张表:学生信息表,教师信息表,成绩表。
富含多个页面,运行流畅,赠送exe文件,打包说明。
代码美观易懂,注释全面,本人亲手打造,无版权纠纷,不含多余库,只需tkinter,sqlite3两种基本库。
内含三个角色:学生,教师,管理员。
包括三张表:学生信息表,教师信息表,成绩表。
富含多个页面,运行流畅,赠送exe文件,打包说明。
代码美观易懂,注释全面,本人亲手打造,无版权纠纷,不含多余库,只需tkinter,sqlite3两种基本库。

代码片段和文件信息
# -*- coding:utf-8 -*-
from tkinter.messagebox import *
from tkinter import *
from student_info_sql import *
from teacher_info_sql import *
from student_achievement_sql import *
from tkinter import ttk
import xlwt
class AdminPage(object):
def __init__(self master=None):
self.root = master #定义内部变量root
self.root.geometry(‘%dx%d‘ % (650 400)) #设置窗口大小
self.root.resizable(00) #防止用户调整尺寸
self.createPage()
def createPage(self):
self.admin_menuPage = admin_Menuframe(self.root) # 创建不同frame
# self.menuPage.pack() #默认显示界面
class admin_Menuframe(frame): # 继承frame类
def __init__(self master=None):
frame.__init__(self master)
self.root = master #定义内部变量root
self.createPage()
def createPage(self):
strs=“欢迎您!系统最高权限的管理者!“
Label(self.root text=strs).place(x=210 y=0)
Button(self.root text=‘查看学生成绩单‘ command=self.print_student_achwidth=15height=5).place(x=200 y=95)
Button(self.root text=‘修改学生成绩‘command=self.change_achwidth=15height=5).place(x=350 y=95)
Button(self.root text=‘添加教师账号‘command=self.teacher_sign_upwidth=15height=5).place(x=200 y=195)
Button(self.root text=‘删除教师账号‘command=self.dele_teacher_numberwidth=15height=5).place(x=350 y=195)
Button(self.root text=‘导出学生成绩单为Excel表格‘command=self.dao_xlswidth=35height=3).place(x=205 y=300)
def dao_xls(self):
a=user_slectTable()
b=user_lie_name()
a.insert(0tuple(b))
def w_excel(res):
book = xlwt.Workbook(encoding=‘utf-8‘) #新建一个excel
sheet = book.add_sheet(‘sheet1‘) #新建一个sheet页
for row in range(0len(res)):
for col in range(0len(res[row])):
sheet.write(rowcolres[row][col])
row+=1
col+=1
book.save(‘student_info.xls‘)
print(“导出成功!“)
w_excel(a)
showinfo(title=‘确认‘ message=‘导出成功!‘)
def dele_teacher_number(self):
def sure_dele():
try:
Teacher_number=self.teacher_number.get()
teacher_deldb(Teacher_number)
showinfo(title=‘确认‘ message=‘删除成功!‘)
self.dele_menu.destroy()
except:
showinfo(title=‘错误‘ message=‘未知错误,请重新删除!‘)
self.dele_menu.destroy()
self.dele_menu = Toplevel(self.root)
self.dele_menu.title(‘删除教师账号‘)
winWidth = 200
winHeight = 200
screenWidth = self.dele_menu.winfo_screenwidth()
screenHeight = self.dele_menu.winfo_screenheight()
x = int((screenWidth - winWidth) / 2)
y = int((screenHeight - winHeight) / 2)
# 设置窗口初始位置在屏幕居中
self.dele_menu.geometry(“%sx%s+%s+%s“ % (winWidth winHeight x y))
# 设置窗口图标
# root.iconbitmap(“./image/icon.ico“)
# 设置窗口宽高固定
self.dele_menu.resizable(0 0)
self.teacher_number=StringVar()
Label(self.dele_menu text=‘教师号: ‘).place(x=10 y=30)
E
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 15003 2020-01-10 15:05 cxk.gif
文件 67646 2019-06-19 19:46 cxk.ico
文件 10426989 2020-01-09 16:30 main.exe
文件 20480 2020-01-09 14:52 student.db
目录 0 2020-01-10 15:08 源码\
文件 12025 2020-01-09 13:59 源码\AdminPage.py
文件 15003 2020-01-10 15:05 源码\cxk.gif
文件 67646 2019-06-19 19:46 源码\cxk.ico
文件 23633 2020-01-09 16:23 源码\LoginPage.py
文件 284 2020-01-09 16:24 源码\main.py
文件 20480 2020-01-09 14:52 源码\student.db
文件 3247 2020-01-09 14:56 源码\student_achievement_sql.py
文件 3231 2020-01-09 14:51 源码\student_info_sql.py
文件 3178 2020-01-09 13:11 源码\teacher_info_sql.py
文件 302 2020-01-09 16:28 源码\打包可运行程序命令.txt
- 上一篇:根据关键字爬虫谷歌、百度、必应图片
- 下一篇:Python Odoo企业级开发实战
相关资源
- Think Python 2nd
- 一个小小的表白程序(python)
- Python课堂笔记(高淇400集第一季)
- 二级考试python试题12套(包括选择题和
- pywin32_python3.6_64位
- python+ selenium教程
- PycURL(Windows7/Win32)Python2.7安装包 P
- 英文原版-Scientific Computing with Python
- 7.图像风格迁移 基于深度学习 pyt
- 基于Python的学生管理系统
- A Byte of Python(简明Python教程)(第
- Python实例174946
- Python 人脸识别
- Python 人事管理系统
- 基于python-flask的个人博客系统
- 计算机视觉应用开发流程
- python 调用sftp断点续传文件
- python socket游戏
- 基于Python爬虫爬取天气预报信息
- python函数编程和讲解
- Python开发的个人博客
- 基于python的三层神经网络模型搭建
- python实现自动操作windows应用
- python人脸识别(opencv)
- python 绘图(方形、线条、圆形)
- python疫情卡UN管控
- python 连连看小游戏源码
- 基于PyQt5的视频播放器设计
- 一个简单的python爬虫
- csv文件行列转换python实现代码
评论
共有 条评论