You are reading the documentation for the main branch, which may contain unreleased changes. The most recent release is v0.1.0.
pnpq.devices.utils module#
- exception pnpq.devices.utils.TimeoutException#
Bases:
Exception
- pnpq.devices.utils.check_usb_hub_connected()#
- Return type:
bool
- pnpq.devices.utils.get_available_port(device_serial_number)#
- Parameters:
device_serial_number (str)
- Return type:
str | None
- pnpq.devices.utils.timeout(timeout_seconds)#
Context manager that yields a function that returns True if the timeout has not been exceeded and throws TimeoutException otherwise, making it suitable for use in loops.
timeout_seconds: float length of timeout, in seconds
- Parameters:
timeout_seconds (float)
- Return type:
Iterator[Callable[[], bool]]