iblrig.hardware.restart_com_port

iblrig.hardware.restart_com_port(regexp)[source]

Restart the communication port(s) matching the specified regular expression.

Parameters:

regexp (str) – A regular expression used to match the communication port(s).

Returns:

Returns True if all matched ports are successfully restarted, False otherwise.

Return type:

bool

Raises:
Parameters:

regexp (str)

Examples

>>> restart_com_port("COM3")  # Restart the communication port with serial number 'COM3'
True
>>> restart_com_port("COM[1-3]")  # Restart communication ports with serial numbers 'COM1', 'COM2', 'COM3'
True