小编M21*_*081的帖子

Python程序在循环之后结束

我试图用python登录系统.要登录,您必须先注册.注册后,将其存储到文本文件中,密码为base64.然后,如果您登录它,则要求输入密码被编码到base64中的用户名和密码,并根据文本文档进行检查.但是当它搜索密码时没有任何反应.它只是结束程序并转到shell.没有回溯错误或任何事情.好像其余的代码是不可见的.代码如下:

try:
    import linecache
    import base64
    import tkinter
    import time
    choice = ""
    def choose():
        choice = input("Would you liek to register or login: ")
        choice = choice.upper()
        if choice == "REGISTER":
            f = open("h.txt", "a")
            f.write("\n")
            print("Please enetr a username")
            username = input(">>> ")
            print("Please enter a password")
            passw = input(">>> ")
            print("\n"*100)
            passw_conf = input("Please enter your password again\n>>> ")
            print("\n"*100)
            if passw == passw_conf:
                print("Thank you for Registering")
                f.write(username + "\n")
                passw = base64.b64encode(passw.encode('utf-8'))
                passw = str(passw)[2:-1] …
Run Code Online (Sandbox Code Playgroud)

python python-3.x

0
推荐指数
1
解决办法
87
查看次数

无法使用或卸载Node.js

我之前使用Windows并安装了Node.js,现在无法使用它或将其卸载,因为它在驱动器D:\上已经不再存在。我看过Windows regedit解决方案,但在那里找不到任何有用的东西。

node.js npm

0
推荐指数
1
解决办法
774
查看次数

标签 统计

node.js ×1

npm ×1

python ×1

python-3.x ×1