一:項目題目:開發一套選課系統
二:項目需求:
角色:學校、學員、課程、講師
要求:
1. 創建北京、上海 2 所學校
2. 創建linux , python , go 3個課程 , linux\py 在北京開, go 在上海開
3. 課程包含,周期,價格,通過學校創建課程
4. 通過學校創建班級, 班級關聯課程、講師
5. 創建學員時,選擇學校,關聯班級
5. 創建講師角色時要關聯學校,
6. 提供兩個角色接口
6.1 學員視圖, 可以注冊, 交學費, 選擇班級,
6.2 講師視圖, 講師可管理自己的班級, 上課時選擇班級, 查看班級學員列表 , 修改所管理的學員的成績
6.3 管理視圖,創建講師, 創建班級,創建課程
7. 上面的操作產生的數據都通過pickle序列化保存到文件里
三:注意事項
1.(簡單)實現70%+功能,充分使用類 2.(一般)類的設計比較清晰、合理 3.(完整)整體代碼邏輯很清晰、角色划分清楚、不同角色的主要功能都實現了
四:項目思路
1,先分析題目,,也就是找關鍵詞,從上面可以看出有三個視圖,分別是管理員視圖,講師視圖,學員視圖
對角色進行分類:學校,老師,學生,課堂,班級,管理者
三個視圖,也就是三個管理接口,分別是學員視圖,講師視圖,管理視圖 五個角色,也就是定義五個類,分別是學校,學員,課程,講師,班級
2,分析管理員創建什么東西,老師創建什么東西,學生創建什么東西
一個講師可以教多個班 一個學員可以學多個班級的課 一個課程可以有多個班級 一個班級對應一個課程 一個班級對應一個講師 學生視圖:要選擇學校,選擇班級,其中班級顯示其名稱,課程,價錢,添加到對應的班級里面 講師視圖:可以查看所教授的課程的班級,班級學生的信息 管理員視圖:可以創建講師,創建班級,創建課程,查詢講師,班級,課程的功能
3,具體進行分析
具體分析學生視圖,學生視圖進去可以注冊學生(包括選擇所在學校,選擇所在班級,選擇所學課程), 查看學生的成績,查看學生的到課情況 具體分析講師視圖,講師視圖進去可以注冊講師(包括選擇所在學校,選擇所教班級,選擇所教課程), 創建學生的成績,創建學生的到課情況(管理班級) 具體分析管理視圖,管理視圖進去可以創建學生,創建講師,創建課程,創建學校,創建班級,創建課程等等 對於管理系統,我附加了登陸認證,我認為管理不是隨便就可以進去的,管理者賬號admin,密碼root, 認證成功后才可以進行一系列操作
4,寫出大致的偽代碼,並實現其功能,如下:
偽代碼:
學校視圖:
選擇學校
1,創建班級
2,創建講師
3,創建課程
4,查詢講師
5,查詢班級
6,查詢課程
講師視圖
1,查看班級
2,查看班級學員列表
學員視圖
1,注冊
2,報名繳費
3,選擇班級
5,填充代碼
五:項目流程圖

六:README文件
作者:zhanzhengrecheng
程序介紹:
實現選課系統 常用功能
功能全部用python的基礎知識實現,用到了os\sys\pickle\函數\模塊\類知識
概述
本次作業文件夾一共包含了以下6個文件:
流程圖: Select Course思路流程圖
程序結構圖:整個Select Course的程序文件結構
程序結構文件:整個Select Course的程序文件結構
程序文件: Select Course
程序說明文件:README.md
程序要求
創建北京、上海 2 所學校
創建linux , python , go 3個課程 , linux\py 在北京開, go 在上海開
課程包含,周期,價格,通過學校創建課程
通過學校創建班級, 班級關聯課程、講師
創建學員時,選擇學校,關聯班級
創建講師角色時要關聯學校,
提供兩個角色接口
學員視圖, 可以注冊, 交學費, 選擇班級,
講師視圖, 講師可管理自己的班級, 上課時選擇班級, 查看班級學員列表 , 修改所管理的學員的成績
管理視圖,創建講師, 創建班級,創建課程
上面的操作產生的數據都通過pickle序列化保存到文件里
本程序思路是寫了一個Select Course的程序
先分析題目,,也就是找關鍵詞,從上面可以看出有三個視圖,分別是管理員視圖,講師視圖,學員視圖
對角色進行分類:學校,老師,學生,課堂,班級,管理者
分析管理員創建什么東西,老師創建什么東西,學生創建什么東西
具體分析學生視圖,學生視圖進去可以注冊學生(包括選擇所在學校,選擇所在班級,選擇所學課程),
查看學生的成績,查看學生的到課情況
具體分析講師視圖,講師視圖進去可以注冊講師(包括選擇所在學校,選擇所教班級,選擇所教課程),
創建學生的成績,創建學生的到課情況(管理班級)
具體分析管理視圖,管理視圖進去可以創建學生,創建講師,創建課程,創建學校,創建班級,創建課程等等
對於管理系統,我附加了登陸認證,我認為管理不是隨便就可以進去的,管理者賬號admin,密碼root,
認證成功后才可以進行一系列操作
寫出偽代碼,然后填充
程序結構
備注(程序結構)
目前還不會在windows中用樹的結構,所以做出程序結構的txt版本,放在文件外面
對幾個實例文件的說明
── admin # 管理者賬戶數據,只存了一個管理者,賬號是admin,密碼是root
── c++ # 這是存課程類中其中一個課程的詳細信息
── class #這是存班級的文件,比如創建了python全棧1班,。。。
── class_grade # 這是存班級中學生成績的文件,比如王二:87
── class_record # 這是存班級中學生到課次數的文件,比如王二:8次
── Course # 這是存所有課程的文件,比如目前開的課程有'python', 'linux', 'java',c++,.。。
── java #這是存課程類中其中一個課程的詳細信息
── linux # 這是存課程類中其中一個課程的詳細信息
── python # 這是存課程類中其中一個課程的詳細信息
── school # 這是存所有學校的文件,比如目前只有北京分校,上海分校,。。。
不足及其改進的方面
1,未能熟練的使用類方法,好多類中函數為了方便類與對象都可以調用,寫成了普通函數,
2,希望對類有更熟悉的認識之后,重構代碼,用class寫,不出現很多@staticmethod
3,想法比較簡單,希望能學習更好的用類寫出來的選課系統,自己再研究研究
七:程序結構圖

八:程序代碼
8.1 bin
bin下run.py
# _*_ coding: utf-8 _*_
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR)
from core import main
if __name__ =='__main__':
main.begin()
8.2 conf
conf下settings.py
# _*_ coding: utf-8 _*_
import sys
import os
import logging
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR)
DATABASE = {
'engine':'file_storage', #文件存儲,這里可擴展成數據庫形式
'name':'accounts', #db下的文件名稱
'path':'%s/db'%BASE_DIR
}
LOGIN_LEVEL = logging.INFO #初始化日志記錄級別為INFO,INFO以下的可以直接打印
#日志類型
LOGIN_TYPE = {
'system':'system.log',
}
8.3 core
core下的accounts.py
# _*_ coding: utf-8 _*_
#讀取數據和保存數據
import os
import sys
import pickle,json
import logging
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR) #添加環境變量
from core import auth
from core import db_handler
from conf import settings
class MyPickle:
def __init__(self):
pass
def load_account(account):
db_path = db_handler.db_handler(settings.DATABASE)
account_file = '%s/%s' % (db_path, account)
if os.path.isfile(account_file): # 如果用戶名存在
with open(account_file, 'rb') as f:
account_data = pickle.load( f)
return account_data
else:
print("\033[31;1mAccount [%s] does not exist!\033[0m" % account)
exit()
def save_account(account_dic):
db_path = db_handler.db_handler(settings.DATABASE)
filename = '%s/%s' % (db_path, account_dic['account'])
with open(filename,'wb') as f:
acc_data = pickle.dump(account_dic, f)
def save_course(account_dic):
db_path = db_handler.db_handler(settings.DATABASE)
filename = '%s/%s' % (db_path, account_dic['course_name'])
with open(filename,'wb') as f:
acc_data = pickle.dump(account_dic, f)
def load_course(course_name):
db_path = db_handler.db_handler(settings.DATABASE)
account_file = '%s/%s' % (db_path, course_name)
if os.path.isfile(account_file):#如果用戶名存在
with open(account_file, 'rb') as f:
account_data = pickle.load( f)
print("\033[34;1m--------這是您查找的課程信息----------\033[0m")
print('\033[32;1m%s\033[0m'%account_data)
return account_data
else:
print("\033[31;1mCourse [%s] does not exist!\033[0m" % course_name)
exit()
def save_class(name,class_name):
db_path = db_handler.db_handler(settings.DATABASE)
filename = '%s/%s' % (db_path, name)
with open(filename, 'a+',encoding='utf-8') as f:
f.write(class_name)
f.write(',')
def load_class(name):
db_path = db_handler.db_handler(settings.DATABASE)
account_file = '%s/%s' % (db_path, name)
if os.path.isfile(account_file): # 如果用戶名存在
with open(account_file, 'r',encoding='utf-8') as f:
account_data = f.read()
print("----------\033[34;1m目前存在的班級\033[0m----------")
print("\033[31;1m%s\033[0m" % account_data)
print("-----------------------------------")
return account_data
else:
print("\033[31;1mClass [%s] does not exist!\033[0m" % name)
exit()
def save_classrecord(name,classrecord_dict):
db_path = db_handler.db_handler(settings.DATABASE)
filename = '%s/%s' % (db_path, name)
with open(filename, 'a+',encoding='utf-8') as f:
f.write(classrecord_dict)
f.write(',')
def load_classrecord(name):
db_path = db_handler.db_handler(settings.DATABASE)
account_file = '%s/%s' % (db_path, name)
if os.path.isfile(account_file): # 如果用戶名存在
with open(account_file, 'r',encoding='utf-8') as f:
account_data = f.read()
print("-----------------課堂記錄-------------------")
print("\033[31;1m%s\033[0m" % account_data)
print("-------------------------------------------")
return account_data
else:
print("\033[31;1mClass record does not exist!\033[0m" )
exit()
def save_classgrade(name,classgrade_dict):
db_path = db_handler.db_handler(settings.DATABASE)
filename = '%s/%s' % (db_path, name)
with open(filename, 'a+',encoding='utf-8') as f:
f.write(classgrade_dict)
f.write(',')
def load_classgrade(name):
db_path = db_handler.db_handler(settings.DATABASE)
account_file = '%s/%s' % (db_path, name)
if os.path.isfile(account_file): # 如果用戶名存在
with open(account_file, 'r',encoding='utf-8') as f:
account_data = f.read()
print("-----------------學生成績-------------------")
print("\033[31;1m%s\033[0m" % account_data)
print("-------------------------------------------")
return account_data
else:
print("\033[31;1mClass grade does not exist!\033[0m")
exit()
def save_school(name, school_name):
db_path = db_handler.db_handler(settings.DATABASE)
filename = '%s/%s' % (db_path, name)
with open(filename, 'a+',encoding='utf-8') as f:
f.write(school_name)
f.write(',')
def load_school(name):
db_path = db_handler.db_handler(settings.DATABASE)
account_file = '%s/%s' % (db_path, name)
if os.path.isfile(account_file): # 如果用戶名存在
with open(account_file, 'r',encoding='utf-8') as f:
account_data = f.read()
print("----------\033[34;1m目前存在的學校\033[0m----------")
print("\033[31;1m%s\033[0m" % account_data)
print("-----------------------------------")
return account_data
else:
print("\033[31;1mSchool does not exist!\033[0m")
exit()
def save_coursedata(name, course_name):
db_path = db_handler.db_handler(settings.DATABASE)
filename = '%s/%s' % (db_path, name)
with open(filename,'a+',encoding='utf-8') as f:
f.write(course_name)
f.write(',')
def load_coursedata(name):
db_path = db_handler.db_handler(settings.DATABASE)
account_file = '%s/%s' % (db_path, name)
if os.path.isfile(account_file): # 如果用戶名存在
with open(account_file, 'r',encoding='utf-8') as f:
account_data = f.read()
print("----------\033[34;1m這是已經有的課程\033[0m----------")
print("\033[31;1m%s\033[0m" % account_data)
print("----------------------------------------------------")
return account_data
else:
print("\033[31;1mCourse does not exist!\033[0m")
exit()
core下auth.py
# _*_ coding: utf-8 _*_
import os
import json
from core import accounts
#用戶認證
def access_login(user_data,log_obj):
'''
登陸函數,當登陸失敗超過三次,則退出
登陸成功之后,查看這個人的身份,來確定進入那個視圖
:return: 如果用戶賬號密碼正確,則返回用戶數據的字典
'''
retry_count = 0
while user_data['is_authenticated'] is not True and retry_count <3:
account = input('\033[34;1mplease input Administrator Acount:\033[0m').strip()
password = input('\033[34;1mplease input Administrator Password:\033[0m').strip()
#用戶賬號密碼正確,則返回用戶數據的字典
auth = access_auth(account,password,log_obj)
if auth:
user_data['is_authenticated'] = True #用戶認證為True
user_data['account_id'] = account #用戶賬號ID為賬號名
return auth
retry_count +=1
else:
print("Account [%s] try logging too many times..." % account)
log_obj.error("Account [%s] try logging too many times..." % account)
exit()
def access_auth(account,password,log_obj):
'''
下面access_login調用access_auth方法,用於登陸
:param account: 用戶名
:param password: 密碼
:param log_obj:
:return:
'''
account_data = accounts.MyPickle.load_account(account)
if account_data.get('vip_password') is not None:
if account_data['vip_password'] == password:
log_obj.info("Account [%s] logging success" % account)
return account_data
else:
log_obj.error(" Password does not correct!")
print("\033[31;1m Password not correct!\033[0m")
else:
log_obj.error("Account or Password does not correct!")
print("\033[31;1mAccount or Passwordoes not correct!\033[0m")
core下db_handler.py
# _*_ coding: utf-8 _*_
'''處理與數據之間的交互,如果file_db_storage,返回路徑'''
import pickle
import os
from conf import settings
def db_handler(conn_parms):
if conn_parms['engine'] == 'file_storage':
return file_db_handle(conn_parms)
def file_db_handle(conn_parms):
'''
對文件路勁做語法分析
:param conn_parms:
:return:
'''
db_path = '%s/%s'%(conn_parms['path'],conn_parms['name'])
return db_path
core下logger.py
# _*_ coding: utf-8 _*_
'''操作所有的日志工作'''
import logging
from conf import settings
def logger(log_type):
#創建日志
logger = logging.getLogger(log_type)
logger.setLevel(settings.LOGIN_LEVEL)
#創建屏幕對象和設置等級debug
# ch = logging.StreamHandler()
# ch.setLevel(settings.LOGIN_LEVEL)
#創建文件對象,給文件對象設置等級
log_file = "%s/log/%s"%(settings.BASE_DIR,settings.LOGIN_TYPE[log_type])
fh = logging.FileHandler(log_file)
fh.setLevel(settings.LOGIN_LEVEL)
# 設置輸出對象格式
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
#把格式添加到配置中
# ch.setFormatter(formatter)
fh.setFormatter(formatter)
#把日志打印到指定的handler
# logger.addHandler(ch)
logger.addHandler(fh)
return logger
core下main.py
# _*_ coding: utf-8 _*_
from core import Manager
from core import Student
from core import Teacher
from conf import settings
from core import logger
from core import auth
import sys
#初始化賬戶數據
user_data = {
'account_id':None,
'is_authenticated':False,
'account_data':None
}
#系統日志記錄到文件中
access_logger = logger.logger('system')
def interactive(msg,menu_dic):
exit_flag = False
while not exit_flag:
print(msg)
user_choice = input("please choice >>>>").strip()
if user_choice in menu_dic:
menu_dic[user_choice]()
else:
print("\033[31;1myou choice doesn't exist\033[0m")
def Student_view():
msg = '''\033[32;1m-------welcome to student manage view------
1 注冊新學生用戶
2 查看上課記錄
3 查看作業成績
4 退出
\033[0m'''
menu_dic = {
"1": Student.Student.resistered,
"2":Student.Student.find_classrecord,
"3":Student.Student.find_grade,
"4":logout,
}
interactive(msg,menu_dic)
def Teacher_view():
msg = '''\033[32;1m-------welcome to teacher manage view------
1 創建新講師
2 創建學生上課情況
3 創建學生考試成績
4 logout
\033[0m'''
menu_dic = {
"1":Teacher.Teacher.resistered,
"2":Teacher.Teacher.create_classrecord,
"3":Teacher.Teacher.create_grade,
"4":logout,
}
interactive(msg, menu_dic)
def Manager_view():
msg = '''\033[32;1m-------welcome to admin manage view------
1 創建講師
2 創建學生
3 創建學校
4 創建課程
5 查看課程
6 查看學校
7 創建班級
8 查看班級
9 退出
\033[0m'''
menu_dic = {
"1":Manager.Manager.create_teacher,
"2":Manager.Manager.create_student,
"3":Manager.Manager.create_school,
"4": Manager.Manager.create_course,
"5": Manager.Manager.show_course,
"6":Manager.Manager.show_school,
"7": Manager.Manager.create_class,
"8": Manager.Manager.show_class,
"9": logout,
}
# login_judge()
interactive(msg, menu_dic)
#退出,寫簡單函數即可
def logout():
'''
退出登陸
:return:
'''
print("\033[32;1m-------Looking forward to your next visit-------\033[0m")
exit()
def begin():
'''
開始入口
:return:
'''
msg = '''\033[32;1m-------welcome to course selectionn system------
1 Student_system
2 Teacher_system
3 Manager_system
4 logout
\033[0m'''
menu_dic = {
"1":Student_view,
"2":Teacher_view,
"3":Manager_view,
"4":logout,
}
interactive(msg, menu_dic)
def login_judge():
# 調用認證模塊,返回用戶文件json.load后的字典,傳入access_logger日志對象
access_data = auth.access_login(user_data,access_logger)
if user_data['is_authenticated']: #如果用戶認證成功
user_data["account_data"] = access_data
core下Manager.py
# _*_ coding: utf-8 _*_
from core import Teacher
from core import Student
from core import accounts
from lib import Course
from lib import Classes
from lib import School
class Manager:
def __init__(self):
pass
@staticmethod
def create_student():
Student.Student.resistered()
@staticmethod
def create_teacher():
Teacher.Teacher.resistered()
@staticmethod
def create_course():
Course.Course.create_course()
@staticmethod
def show_course():
Course.Course.show_course()
@staticmethod
def create_class():
Classes.Classes.create_class()
@staticmethod
def show_class():
Classes.Classes.show_class()
@staticmethod
def create_school():
School.School.create_school()
@staticmethod
def show_school():
School.School.show_school()
core下Student.py
# _*_ coding: utf-8 _*_
'''
學員視圖,學員創建姓名,年齡,所報的班級,所報的學校等等
'''
from core import main
from core import accounts
from core import Manager
from lib import Course
class Student:
def __init__(self):
pass
#學生注冊
@staticmethod
def resistered():
student_dict = {}
print('\033[32;1m-------welcome to student registered system------\033[0m')
student_name = input("student_name >>>")
student_password = input("student_password >>>")
Manager.Manager.show_school()
student_school = input("student_school >>>")
Manager.Manager.show_class()
student_class = input("student_class >>>")
accounts.MyPickle.load_coursedata('course')
student_course = input("student_course >>>")
student_score = None
student_identity = 'student'
student_dict['account'] = student_name
student_dict['password'] = student_password
student_dict['school'] = student_school
student_dict['class'] = student_class
student_dict['course'] = student_course
student_dict['score'] = student_score
student_dict['identity'] = student_identity
print("\033[32;1m--------這是您登記的信息,請查看----------\033[0m")
print('\033[31;1m%s\033[0m'%student_dict)
accounts.MyPickle.save_account(student_dict)
#查看上課記錄
@staticmethod
def find_classrecord():
'''上課記錄是老師給的'''
print('\033[32;1m-------welcome to Student system(find classrecord)------\033[0m')
name = 'class_record'
accounts.MyPickle.load_classrecord(name)
#查看作業成績
@staticmethod
def find_grade():
'''成績是老師給的'''
print('\033[32;1m-------welcome to Student system(find classgrade)------\033[0m')
name = 'class_grade'
accounts.MyPickle.load_classgrade(name)
core下Teacher.py
# _*_ coding: utf-8 _*_
from core import accounts
from core import Manager
class Teacher:
def __init__(self):
pass
#講師注冊
@staticmethod
def resistered():
teacher_dict = {}
print('\033[32;1m-------welcome to teacher registered system------\033[0m')
teacher_name = input("teacher_name >>>")
teacher_password = input("teacher_password >>>")
Manager.Manager.show_school()
teacher_school = input("teacher_school >>>")
Manager.Manager.show_class()
teacher_class = input("teacher_class >>>")
teacher_identity = 'teacher'
teacher_dict['account'] = teacher_name
teacher_dict['password'] = teacher_password
teacher_dict['school'] = teacher_school
teacher_dict['class'] = teacher_class
teacher_dict['identity'] = teacher_identity
print("\033[32;1m--------這是您登記的信息,請查看----------\033[0m")
print('\033[31;1m%s\033[0m' % teacher_dict)
accounts.MyPickle.save_account(teacher_dict)
#創建上課記錄,想法是每一個人對應一個記錄,比如王某:8次
@staticmethod
def create_classrecord():
classrecord_dict = {}
print('\033[32;1m-------welcome to teacher system(create class_record)------\033[0m')
student_name = input("student_name >>>")
class_record = input("class_record >>>")
classrecord_dict[student_name] = class_record
name = 'class_record'
classrecord_dict = str(classrecord_dict)
accounts.MyPickle.save_classrecord(name,classrecord_dict)
#創建作業成績,想法是每一個人對應一個記錄,比如王某:98
@staticmethod
def create_grade():
classgrade_dict = {}
print('\033[32;1m-------welcome to teacher system(create class_grade)------\033[0m')
student_name = input("student_name >>>")
class_grade = input("class_grade >>>")
classgrade_dict[student_name] = class_grade
name = 'class_grade'
classgrade_dict = str(classgrade_dict)
accounts.MyPickle.save_classgrade(name,classgrade_dict)
8.4 db
db下accounts
(這是文件,在這里就不一一展示了)
8.5lib
lib下Classes
# _*_ coding: utf-8 _*_
from lib import Course
from core import accounts
from core import Manager
class Classes:
def __init__(self):
pass
@staticmethod
def create_class():
name = 'class'
print('\033[32;1m-------welcome to manage system(create class)------\033[0m')
class_data = accounts.MyPickle.load_class(name)
class_name = input("class_name >>>")
accounts.MyPickle.save_class(name,class_name)
@staticmethod
def show_class():
print('\033[32;1m-------welcome to Manager system(find class)------\033[0m')
name = 'class'
accounts.MyPickle.load_class(name)
lib下Course
# _*_ coding: utf-8 _*_
#創建一個課程類,包括課程名稱,課程周期,課程價格
from core import accounts
from core import Manager
class Course:
def __init__(self):
pass
@staticmethod
def create_course():
name = 'course'
print('\033[32;1m-------welcome to Manager system(create course)------\033[0m')
course_data = accounts.MyPickle.load_coursedata(name)
course_dict = {}
accounts.MyPickle.load_school('school')
course_school = input("The school of course:>>>")
course_name = input("course name:>>>")
course_period = input("course period:>>>")
course_prices = input("course prices:>>>")
course_dict["course_school"] = course_school
course_dict["course_name"] = course_name
course_dict["course_period"] = course_period
course_dict["course_prices"] = course_prices
print("\033[32;1m--------這是您創建課程的信息,請查看----------\033[0m")
print('\033[31;1m%s\033[0m' % course_dict)
accounts.MyPickle.save_course(course_dict)
accounts.MyPickle.save_coursedata(name, course_name)
@staticmethod
def show_course():
'''
輸入課程信息
:return:
'''
print('\033[32;1m-------welcome to Manager system(find course)------\033[0m')
name = 'course'
accounts.MyPickle.load_coursedata(name)
course_name = input("請輸入要查找的課程名:>>>")
accounts.MyPickle.load_course(course_name)
lib下School
# _*_ coding: utf-8 _*_
from lib import Course
from core import accounts
class School:
def __init__(self):
pass
@staticmethod
def create_school():
name = 'school'
school_data = accounts.MyPickle.load_school(name)
print('\033[32;1m-------welcome to manage system(create school)------\033[0m')
school_name = input("school_name >>>")
accounts.MyPickle.save_school(name,school_name)
@staticmethod
def show_school():
print('\033[32;1m-------welcome to Manager system(find school)------\033[0m')
name = 'school'
accounts.MyPickle.load_school(name)
8.6log
system.log
2018-04-19 09:15:24,489 - system - ERROR - Account or Password does not correct! 2018-04-19 09:15:36,036 - system - ERROR - Account or Password does not correct! 2018-04-19 09:15:43,911 - system - ERROR - Account or Password does not correct! 2018-04-19 09:15:43,911 - system - ERROR - Account [admin] try logging too many times... 2018-04-19 09:20:48,536 - system - ERROR - Account or Password does not correct! 2018-04-19 09:23:00,911 - system - INFO - Account [admin] logging success 2018-04-19 09:29:27,238 - system - INFO - Account [admin] logging success 2018-04-19 09:40:13,110 - system - INFO - Account [admin] logging success 2018-04-19 10:02:58,567 - system - INFO - Account [admin] logging success 2018-04-19 10:03:16,395 - system - INFO - Account [admin] logging success 2018-04-20 13:57:36,289 - system - ERROR - Account or Password does not correct! 2018-04-20 13:58:19,360 - system - ERROR - Account or Password does not correct! 2018-04-20 13:58:52,241 - system - ERROR - Account or Password does not correct! 2018-04-20 14:00:03,168 - system - INFO - Account [admin] logging success 2018-04-20 14:00:43,360 - system - INFO - Account [admin] logging success 2018-04-20 14:01:50,831 - system - INFO - Account [admin] logging success 2018-04-20 14:02:24,279 - system - INFO - Account [admin] logging success
