devctrl.devices.device_select.select_device_interactive#

select_device_interactive(dev_info: DeviceInfo, prompt='Select a device for <name>: ') tuple[str, str][source]#

Select a device interactively from the command line

Parameters:
  • dev_info – A DeviceInfo object. The list of devices will be determined from by calling dev_info.device_type.list_devices()

  • prompt – A prompt to display. The following expressions will be substituted: - ‘<key>’ - ‘<name>’ - ‘<device_type>’ - ‘<connect_priority>’ - ‘<global_varname>’ - ‘<N>’: number of devices found

Returns:

The type and name of the selected device. These can be passed to the connect_device method of the device type to actually connect a device.