Skip to content

Instantly share code, notes, and snippets.

@SimonMerrett
SimonMerrett / Chat.md
Created December 3, 2025 19:39
VXI11 service request event handling for pyvisa-py

Prompt for Gemini 3.0:

https://github.com/pyvisa/pyvisa-py is a backend for https://github.com/pyvisa/pyvisa/ How do I add install_handler() to pyvisa-py so that I don't need to install NI VISA backend?

Response:

Implementing install_handler() in pyvisa-py to avoid the NI-VISA dependency is a significant but achievable task. It requires modifying the pyvisa-py source code to implement the event handling logic that the proprietary drivers usually handle for you.

To do this, you essentially need to build an event registry and a listening mechanism (like a background thread) that monitors the hardware interface for interrupts or service requests.