程序在某一点后停止

时间:2018-02-23 17:10:28

标签: wxpython

我的程序在某一点后停止 - 注册后它就停止了,我很困惑什么可以阻止它,因为它工作完全正常。

import os
import time
def main():


   print("Search: Registration | Login")
   print("Note: Must Registrate first to continue")
   time.sleep(2)
   print("Welcome To CityRP Gaming!")
   search = input("Search.... ")

if search == 'registration':
    reg()

if search == 'login':
    login()

        #Must Register to continue
def reg():


    print("Display Name")
    reg_user = input()
    print("Password")
    reg_pass = input()
    time.sleep(1)
    print("Registration Successful!")
    main()    
        #Must Login to continue

def loging():


    print("Enter Username: ")
    username = input()
    print("Enter Password: ")
    password = input()

if 'username == reg_user' and 'password == reg_pass':
    time.sleep(1)
    print("Login Successful!")
    logged()

else:
    print("Try Again!")
    loging()

        #Main logged in interface
def logged():
    time.sleep(1)
    print("Welcome To CityRP Gaming")
    time.sleep(3)
    print("What would you like to do?")
    time.sleep(3)
    print("Friends, Rules, Search, Register, Exit")
    cmdlist = input()

if cmdlist == 'Friends':
    friends = input("Do you want friends?")
    logged()
elif cmdlist == 'Rules':
    print('''\nRules:
\n-No racism,
\n-No mini-hitlers''')
    logged()
elif cdmlist == 'Search':
    main()

elif cdmlist == 'Register':
    reg()

0 个答案:

没有答案