def determine_if_error(command): error = True while error == True: cmd_error = is_cmd_error(command) if cmd_error == True: return True else: return False
def console(): session = 'active' while session == 'active': command = raw_input('\n@') determine_if_error = is_cmd_error(command) if determine_if_error == True: print "Not a recognized command. Enter 'help' for a list of useable commands." elif determine_if_error == False: parse(command)