user_reset.py和user_login.py在同一目录

-----------------user_reset.py

pickle
user={:{:,:,:},:{:,:,:}}
(user)
f=(,)
pickle.dump(user,f)
f.close()

-----------------------------user_login.py

pickle,sys,getpass
f=(,)
user_all=pickle.load(f)
f.close()
write_user():
    f = (, )
    pickle.dump(user_all, f)
    f.close()

logion():
    FLAG=user=()
    user user_all.keys():
        ()
        user = ()
        user == :
            sys.exit()
    :
        user_all[user][] ==:
                password = ()
                password != user_all[user][]:
                    user_all[user][] -=user_all[user][] == :
                        user_all[user][] = (% user)
                        write_user()
                        sys.exit()
                    (%user_all[user][])
                    password = ()
                    password == :
                        write_user()
                        sys.exit()
                :
                    user_all[user][]=()
                    write_user()
                    FLAG = :
            (%user)
    FLAG
__name__ == :
    logion()
----------------------------------------------------------