serial_dashboard.comms.device_name

serial_dashboard.comms.device_name(port)

Generate a name for a device at a given port.

Parameters

port (serial.tools.list_ports_common.ListPortInfo instance) – Port in question. The port instance is usually generated by calling serial.tools.list_ports.comports().

Returns

output – A name for the port. If there is an HWID record known to the serial-dashboard package, the name of the device is drawn from that; otherwise, if available, the name of the manufacturer is used. If none of those are available, then port.device appended with two spaces is returned.

Return type

str