def run(n, p, a, b, c): print( "----------------------------------------------------------------------" ) passw = input(f'Please provide the master password to start using {n}: ') print( "----------------------------------------------------------------------" ) if passw == decrypt_pw(p): print('You\'re in') else: print('no luck') exit() choice = menu() while choice != 'Q': if choice == '1': create(a, b, c) if choice == '2': find_accounts(a, b, c) if choice == '3': find(a, b, c) choice = menu() elif choice == '4': choice = delAccount(a, b, c) else: choice = menu()
def configscreen(): global first_run list1 = ["IP VE PORT U AYARLA", "CHAT KAYDI"] choice1 = menu.create(list1) if choice1 == 0: setip() first_run = 1 saveload() else: logconfig()
def runProgram(): passw = input('Hello master, please start by providing the master password: '******'You\'re in') menuChoice = mainMenu() if menuChoice == '1': create() elif menuChoice == '2': find_accounts() elif menuChoice == '3': find() elif menuChoice == 'Q': exit() else: choice = input('No luck...would you link to try again? Type YES or NO. ') if choice == 'YES': runProgram() elif choice == 'NO': exit() else: print("Not a valid response") runProgram()
def logconfig(): global logging global first_run choice = menu.create(["CHATLOG U ETKINLESTIR", "CHATLOG U KAPAT"]) if choice == 0: logging = "True" print("Log aktiflestirildi uygulama tekrar baslatiliyor.") first_run = 1 saveload() sys.exit() else: logging = "False" print("Log kapatildi uygulama tekrar baslatiliyor.") first_run = 1 saveload() sys.exit()
def reply(self): responseMsg = TextMsg(self.fromUser, self.toUser, int(time.time()), self.content) if manager.check(self.fromUser): if self.content.strip().encode('utf-8') == '更新菜单': error = menu.create() if error['errcode'] == 0: responseMsg.content = '更新成功' else: responseMsg.content = '更新失败\n原因: ' + error[ 'errmsg'].encode('utf-8') if self.content.strip().encode('utf-8') == '座位信息': seating = Seating.objects.get(id=1) seating = json.loads(seating.seating) content = '\n'.join([str(seat) for seat in seating]) if content == '': content = '没人入座' responseMsg.content = content if self.content.strip().encode('utf-8') == '用户信息': responseMsg.content = self.fromUser return responseMsg
def account_creation_successful( logon_seq, account ): add_account( account ) logon_seq.send("Committed your account.\n") logon( logon_seq, account ) ############################### # Player successfully logs on ############################### def logon( logon_seq, account ): logon_seq.logon( logon_seq, account.id ) ############################## # Player connects to the MUD ############################## welcome_menu = menu.create([("Create a New Account", logon_input_new_account_name)]) def welcome( logon_seq ): logon_seq.send("Welcome to MUD under development!\n\n") logon_seq.send( welcome_menu.str ) logon_seq.send( "OR Account Name: " ) logon_seq.next_state( welcome_menu.parser, logon_receive_account_name )
def mainmenu(): return menu.create(["BASLAT", "CONFIG", "CIKIS"])
def setmode(): liste = ['Server', 'Client'] mode = menu.create(liste) return mode
import pygame import menu pygame.init() xsz = 750 ysz = 500 screen = pygame.display.set_mode((xsz,ysz)) menu.create(screen, xsz, ysz) done = False while(not done): for event in pygame.event.get(): if event.type == pygame.QUIT: done = True quit()
from menu import menu, create, find, find_accounts # menu # 1. create new password for a site # 2. find password for a site # 3. Find all sites connected to an email secret = get_secret_key() passw = getpass( prompt= 'Please provide the master password to start using kallemanager3000: ') if passw == secret: print('You\'re in') else: print('no luck') exit() choice = menu() while choice != 'Q': if choice == '1': create() if choice == '2': find_accounts() if choice == '3': find() else: choice = menu() exit()
def menu2(): menu.create() return "ok"