DriverEntry#

class DriverEntry(
path: str,
idn_patterns: tuple[IdnPattern, ...] = (),
)[source]#

Bases: object

A registered driver: its import path and the instrument identities that map to it.

Variables:
  • path (str) – Dotted import path of the driver class, e.g. "instro.psu.drivers.bk_9115.BK9115".

  • idn_patterns (tuple[IdnPattern, ...]) – *IDN? patterns discovery matches to this driver. Empty for drivers that have no physical identity (simulators).

Example:

DriverEntry(
    "instro.psu.drivers.bk_9115.BK9115",
    (IdnPattern(("B&K PRECISION",), r"^9115", 1),),
)
path: str#
idn_patterns: tuple[IdnPattern, ...] = ()#
property class_name: str#

The bare class name, e.g. "BK9115".

load() → type[source]#

Import and return the driver class.