|
#!/usr/bin/python
import sys
from menu import menu_show
while True:
user = str(raw_input("\033[1;32;40mPlease input your name:\033[0m"))
f = open('user_list','r+')
for line in f.readlines():
n = str(line.split()[0])
p = str(line.split()[1])
if user == n:
while True:
password = str(raw_input("\033[1;32;40mPlease input your password:\033[0m"))
if password != p:
print "\033[1;31;40mThe password is incorrect\033[0m"
continue
else:
print "\033[1;32;40myes let you in.\033[0m"
global money
money_total = 15000
while True:
print "\033[1;33;40mYou total money is: \033[0m",money_total
money_total = menu_show(user,money_total)
else:
print "\033[1;31;40mThe user is not vaild, please re-input:\033[0m"
continue |
|
|