PyVISA-py: Pure Python backend for PyVISA

PyVISA

PyVISA-py is a backend for PyVISA. It implements most of the methods for Message Based communication (Serial/USB/GPIB/Ethernet) using Python and some well developed, easy to deploy and cross platform libraries.

You can select the PyVISA-py backend using @py when instantiating the visa Resource Manager:

>>> import visa
>>> rm = visa.ResourceManager('@py')
>>> rm.list_resources()
('USB0::0x1AB1::0x0588::DS1K00005888::INSTR')
>>> inst = rm.open_resource('USB0::0x1AB1::0x0588::DS1K00005888::INSTR')
>>> print(inst.query("*IDN?"))

That’s all! Except for @py, the code is exactly what you would write to using the NI-VISA backend for PyVISA.

Currently Pyvisa-py support the following resources:

  • TCPIP INSTR
  • TCPIP SOCKET
  • GPIB INSTR
  • ASRL INSTR
  • USB INSTR
  • USB RAW

You can report a problem or ask for features in the issue tracker. Or get the code in GitHub.