'0. Exit.\n' ': ') if choice in ('1', 'scan', 's'): list_of_meter_units = scan() elif choice in ('2', 'request', 'r'): target = int(input('Which unit? ')) last_response = request_data(target) elif choice in ('3', 'ping', 'p'): target = int(input('Which unit? ')) print(ping(target)) elif choice in ('4', 'get', 'g'): target = 'list_of_devices.csv' list_of_meter_units = read_file(target) print(list_of_meter_units) elif choice in ('5', 'z'): nm.switch_remote_host() print("Remote host is now " + nm.remote_host) elif choice in ('6', 'data', 'd'): if list_of_meter_units: for i in list_of_meter_units: request_data(i) else: for i in range(1, 99): request_data(i) sleep(11) elif choice in ('7', 'b'): level = 10 * int(input('1: Debug\n' '2: Info\n' '3: Warning\n' '4: Error\n' '5: Critical\n'))