文件目录下有两个文件
user_name.txt
lock_file.txt
实际中可以读数据库里的信息
代码如下
1 #encoding = utf-8 2 import sys 3 4 user_file = 'user_name.txt' 5 lock_file = 'lock_file.txt' 6 7 retry_count = 0 8 retry_limit = 3 9 10 while retry_count < retry_limit: 11 username = raw_input('