def repl_loop(): while True: raw = input("> ") if raw == 'exit': break parts = raw.split(" ") command = parts[0] del parts[0] if command in repl_commands: repl_commands[command](parts) repl_loop()