pylabrobot.micronic.code_reader.scanner.TwainScanner#

class pylabrobot.micronic.code_reader.scanner.TwainScanner(twain_scanner_path: str | None = None, twain_source: str = 'AVA6PlusG', command_line: CommandLineTransport | None = None)#

Bases: Scanner

Windows TWAIN scanner driven by an operator-installed helper executable.

Resolves the helper path from (in order): the twain_scanner_path argument, the MICRONIC_TWAIN_SCANNER_PATH environment variable, or twain_scan / twain_scan.exe on PATH. Raises MicronicError if none resolve.

Attributes

Methods

__init__([twain_scanner_path, twain_source, ...])

Initialize a TWAIN scanner.

acquire(output_path, timeout)

Acquire a BMP image through the configured TWAIN helper.

setup()

Resolve and prepare the TWAIN helper executable.

stop()

Stop the TWAIN helper transport.

Parameters:
  • twain_scanner_path (Optional[str])

  • twain_source (str)

  • command_line (Optional[CommandLineTransport])