def main(): """ Main function for the CLI parsing. """ cli_parser.parse_options() # print(cli_parser.options) # print(cli_parser.options["known_args"]) # print() sys.exit()
def main(): """ Main function where it all starts. """ cli_parser.parse_options() print(cli_parser.options) print(cli_parser.options["known_args"]["command"]) print() sys.exit()
def main(): """ Main function where it all starts. """ options = cli_parser.parse_options() command = options["args"]["command"] silent = options["args"]["silent"] verbose = options["args"]["verbose"] if command == "hello": if silent: print("Hi!") elif verbose: print(verbose_text.format(input=command, unknown=options["unknown_args"])) else: print("This is a response to the command: " + command + ":\nHello there!") if command == "goodbye": if silent: print("Bye!") elif verbose: print(verbose_text.format(input=command, unknown=options["unknown_args"])) else: print("This is a response to the command: " + command + ":\nGoodbye!") sys.exit()
def main(): """ Main function where it all starts. """ options = cli_parser.parse_options() print(options) if options["args"]["first"]: print("Your input was: ", options["args"]["first"]) sys.exit()
def main(): """ The main func that starts the program """ opts = cli_parser.parse_options() args = opts["known_args"] if args["info"] is True: print_info_cli() elif args["cheat"] is True: print_cheat() elif args["about"] is True: print_about() else: start_game()
def main(): """ Main function where it all starts. """ options = cli_parser.parse_options() command = options["args"] silent = options["args"]["silent"] verbose = options["args"]["verbose"] if command["first"]: if silent: print(command["first"]) elif verbose: print(verbose_text.format(input=command["first"], unknown=options["unknown_args"])) else: print("Your input was:", command["first"]) sys.exit()
interaction = splited[0] item = splited[1] rooms = game.to_open(rooms, current_room, interaction, item) else: game.notValid() # Detta gick inte igenom valideringen....... :( # elif "open" in choice or "k" in choice or "kick" in choice\ # or "l" in choice or "look" in choice or "o" in choice\ # or "open" in choice or "m" in choice or "move" in choice: # # sends room dictionary, current room splited string into open function # splited = choice.split() # interaction = splited[0] # item = splited[1] # # rooms = game.to_open(rooms, current_room, interaction, item) # # else: # game.notValid() sys.exit() # input("\nPress enter to continue...") if __name__ == "__main__": cli_parser.parse_options() #print(cli_parser.parse_options()) #print(cli_parser.options["known_args"]["command"]) main()