插件:
提取码:ex9m
1.在Oppen Live Writer安装目录下的app_xx目录下创建Plugins文件夹
2.将下载的压缩包解压后将文件夹中的所有文件复制到Plugins文件夹下即可.
这个插件也是在其他大佬的博客中找到的,推荐一下,挺不错的。
插入代码折叠方式可如下
1 __Author__ = "YiMi Du" 2 3 from core import auth 4 from core import creditcard 5 from core import log 6 from core import shopping 7 from core import user 8 def main_list(): 9 msg = [" ATM ", 10 "购物商城", 11 "管理系统", 12 "退出程序 输入 q", ] 13 14 index = 0 15 for i in msg: 16 print("\t\t\t\t", index + 1, "\t ", i) 17 index += 1 18 19 20 '''ATM页面列表''' 21 22 23 def atm_list(): 24 msg = ["信用卡信息", 25 "信用卡取现", 26 "信用卡转账", 27 "信用卡还款", 28 "申请信用卡", 29 "信用卡绑定", 30 "信用卡流水", 31 "返回上一层 输入 q", 32 "退出程序 输入 exit"] 33 34 index = 0 35 for i in msg: 36 print("\t\t\t\t", index + 1, "\t ", i) 37 index += 1 38 39 40 '''购物车页面列表''' 41 42 43 def shopp_list(): 44 msg = ["购物", 45 "购物车", 46 "购物结算", 47 "购物记录", 48 "清空购物车", 49 "返回上一层 输入 q", 50 "退出程序 输入 exit"] 51 52 index = 0 53 for i in msg: 54 print("\t\t\t\t", index + 1, "\t ", i) 55 index += 1 56 57 '''管理员页面列表''' 58 59 60 def admin_list(): 61 msg = ["冻结信用卡", 62 "解冻信用卡", 63 "创建用户", 64 "锁定用户", 65 "解锁用户", 66 "返回上一层 输入 q", 67 "退出程序 输入 exit"] 68 69 index = 0 70 for i in msg: 71 print("\t\t\t\t", index + 1, "\t ", i) 72 index += 1 73 74 '''主函数''' 75 76 def main(): 77 print("购物商城ATM系统".center(40, "-")) 78 user.lock() # 三次锁定模块 79 while True: 80 print("欢迎来到购物商城ATM系统".center(40, "-")) 81 print(" \t\t\t\t ID\t\t信息") 82 main_list() 83 choice = input("请选择 ID :").strip() 84 if choice == "q": 85 print(" bye bye ".center(50, "-")) 86 exit() 87 if choice.isdigit(): 88 choice = int(choice) 89 if choice >= 1 and choice <= 4: 90 if choice == "q": break 91 while True: 92 if choice == 1: 93 print("欢迎来到信用卡中心".center(50, "-")) 94 print(" \t\t\t\t ID\t\tATM信息") 95 atm_list() # 信用卡列表 96 atm_choice = input("请选择 ATM ID :").strip() 97 if atm_choice == "q": break 98 if atm_choice == "exit": exit() 99 if atm_choice.isdigit():100 atm_choice = int(atm_choice)101 if atm_choice >= 1 and atm_choice <= 7:102 while True:103 if atm_choice == 1:104 creditcard.creditcard_data() # 信用卡信息模块105 break106 elif atm_choice == 2:107 creditcard.creditcard_auth() # 信用卡认证模块108 creditcard.takenow() # 信用卡取现模块109 break110 elif atm_choice == 3:111 creditcard.creditcard_auth() # 信用卡认证模块112 creditcard.transfer() # 信用卡转账模块113 break114 elif atm_choice == 4:115 creditcard.creditcard_auth() # 信用卡认证模块116 creditcard.repayment() # 信用卡还款模块117 break118 elif atm_choice == 5:119 creditcard.new_creditcard(limit=15000, locked=False) # 申请信用卡模块120 break121 elif atm_choice == 6:122 creditcard.link_creditcard() # 用户绑定信用卡模块123 break124 elif atm_choice == 7:125 creditcard.cat_cred_record() # 查看信用卡流水模块126 break127 else:128 print("请输入正确的 ID ")129 else:130 print("请输入正确的 ID ")131 132 elif choice == 2:133 print("欢迎来到购物中心".center(50, "-"))134 print(" \t\t\t\t ID\t\t商城信息")135 shopp_list() # 商城列表136 shopp_choice = input("请选择 商城 ID :").strip()137 if shopp_choice == "q": break138 if shopp_choice == "exit": exit()139 if shopp_choice.isdigit():140 shopp_choice = int(shopp_choice)141 if shopp_choice >= 1 and shopp_choice <= 5:142 while True:143 if shopp_choice == 1:144 shopping.shopping_mall() # 购物商城模块145 break146 elif shopp_choice == 2:147 shopping.Shopping_car() # 购物车模块148 break149 elif shopp_choice == 3:150 shopping.shopping_pay() # 购物结算模块151 break152 elif shopp_choice == 4:153 shopping.cat_shopp_record() # 查看购物记录模块154 break155 elif shopp_choice == 5:156 shopping.del_shopping_car() # 清空购物车模块157 break158 else:159 print("请输入正确的 ID ")160 else:161 print("请输入正确的 ID ")162 163 elif choice == 3:164 print("欢迎来到管理中心".center(50, "-"))165 print(" \t\t\t\t ID\t\t操作信息")166 admin_list() # 管理中心列表167 admin_choice = input("请选择 信息 ID :").strip()168 if admin_choice == "q": break169 if admin_choice == "exit": exit()170 if admin_choice.isdigit():171 admin_choice = int(admin_choice)172 if admin_choice >= 1 and admin_choice <= 5:173 while True:174 if admin_choice == 1:175 auth.admin_auth() # 管理员用户验证模块176 creditcard.lock_creditcard() # 冻结信用卡模块177 break178 elif admin_choice == 2:179 auth.admin_auth() # 管理员用户验证模块180 creditcard.unlock_creditcard() # 解冻信用卡模块181 break182 elif admin_choice == 3:183 auth.admin_auth() # 管理员用户验证模块184 # 创建用户模块185 user.new_user(address="None", locked=False, creditcard=False)186 break187 elif admin_choice == 4:188 auth.admin_auth() # 管理员用户验证模块189 user.lock_user() # 锁定用户模块190 break191 elif admin_choice == 5:192 auth.admin_auth() # 管理员用户验证模块193 user.unlock_user() # 解锁用户模块194 break195 196 elif choice == 4:197 exit()198 199