小说阅读器
小说阅读器 启动模块bin/start.py 1 import os 2 import sys 3 4 BASE_PATH=os.path.dirname(os.path.dirname(__file__)) 5 sys.path.append(BASE_PATH) 6 7 8 from core import src 9 10 if __name__== '__main__': 11 src.run() 核心代码模块core/src.py 1 from db import db_handler as db 2 from lib import common 3 4 5 login_user = None 6 7 8 9 10 def register(): 11 ''' 12 注册功能 13 :return: 14 ''' 15 while True: 16 inp_name = input('输入用户名').strip() 17 name, psd, remind = db.getinfo(inp_name) 18 if inp_name in name: 19 print('用户已存在') 20 password = input('输入密码') 21 re_psd = input('再次输入密码') 22 if password == re_psd: 23 db.save