while True:
name = raw_input("please input your name:")
if name == 'dingwei':
password = raw_input("please input your password:")
while password != 'cbh':
password = raw_input("please input your password:")
print "----------------------------------"
print "welcome to login to system!"
while True:
match_yes = 0
input = raw_input("please input the name whom you want to search:")
contact_file = file('contact_list.txt')
while True:
line = contact_file.readline()
if len(line) == 0:break
if input == 'quit' or input == 'exit':
match_yes = 2
if input != "" and input in line:
print 'Match item %s' % line
match_yes = 1
if match_yes ==0:
print 'No match item found.'
if match_yes ==2:
print '---------------------'
print 'You had exited access!'
break
break