def main(): questions = [{ 'type': 'input', 'name': 'first_name', 'message': 'What\'s your first name' }] answers = prompt(questions) print_json(answers)
}, { 'key': 'a', 'name': 'All dressed', 'value': 'alldressed' }, { 'key': 'w', 'name': 'Hawaiian', 'value': 'hawaiian' }] }, { 'type': 'rawlist', 'name': 'beverage', 'message': 'You also get a free 2L beverage', 'choices': ['Pepsi', '7up', 'Coke'] }, { 'type': 'input', 'name': 'comments', 'message': 'Any comments on your purchase experience?', 'default': 'Nope, all good!' }, { 'type': 'list', 'name': 'prize', 'message': 'For leaving a comment, you get a freebie', 'choices': ['cake', 'fries'], 'when': lambda answers: answers['comments'] != 'Nope, all good!' }] answers = prompt(questions, style=style) print('\nOrder receipt:') print_json(answers)
import traceback, os, utils, atexit, settingsTools from whaaaaat import print_json settings = settingsTools.loadSettings() def onexit(): utils.killJDKs() atexit.register(onexit) # Crash handler try: import main except BaseException: print("Some exception occured, please report in discord (https://discord.gg/xkTteTM):") print("----CUT HERE----") print("Installer settings:") print_json(settings.dict) traceback.print_exc() utils.killJDKs() os.system("pause")
import utils from whaaaaat import print_json settings = settingsTools.settings locales = settingsTools.locales can_continue = True if utils.is_running_from_zip(): locales.adv_print("TEMP_FOLDER_EXIT") can_continue = False def on_exit(): utils.kill_jdk() atexit.register(on_exit) # Crash handler if can_continue: try: import main except BaseException: print("Some exception occurred, please report in discord (https://discord.gg/xkTteTM):") print("----CUT HERE----") print("Installer settings:") print_json(settings.content) traceback.print_exc() utils.kill_jdk() os.system("pause")