initdb = my_init_DB() today = datetime.now().strftime("%Y-%m-%d") weekoftoday = date.weekday(datetime.now()) # 用户初始化 curruser = my_clsUsers() # --------- 开始 主程序 -------------- exitFlag = False while not exitFlag: # 根据是否登录显示不同的登录界面 if not curruser.islogin: print( my_template.index_default_menu.format( "欢迎您,请登录", today, my_Common.numtochr(weekoftoday))) else: print( my_template.index_logined_menu.format( "欢迎您: {0}".format(curruser.name), today, my_Common.numtochr(weekoftoday))) choose = my_Common.input_msg("选择功能编号[1-3]: ", ("1", "2", "3")).strip() # 3 退出系统 if choose == "3": exitFlag = True continue # 2 用户登录 if choose == "1":
initdb = my_init_DB() today = datetime.now().strftime("%Y-%m-%d") weekoftoday = date.weekday(datetime.now()) # 用户初始化 curruser = my_clsUsers() # --------- 开始 主程序 -------------- exitFlag = False while not exitFlag: # 根据是否登录显示不同的登录界面 if not curruser.islogin: print(my_template.index_default_menu.format("欢迎您,请登录", today, my_Common.numtochr(weekoftoday) ) ) else: print(my_template.index_logined_menu.format("欢迎您: {0}".format(curruser.name), today, my_Common.numtochr(weekoftoday) ) ) choose = my_Common.input_msg("选择功能编号[1-3]: ", ("1", "2", "3")).strip() # 3 退出系统 if choose == "3": exitFlag = True continue