Rigol Python RaspberryPi - automated, remote control scripts, USB, test equipment. This is example code for control benchtop instruments over USB running Python3 on a RaspberryPi (or similar SBC).
Hackaday.com PyVisa project https://hackaday.com/2016/11/16/how-to-control-your-instruments-from-a-computer-its-easier-than-you-think/
pyvisa
https://pyvisa.readthedocs.io/en/stable/index.html
Install Python3. Then, install these Python packages:
sudo pip install pyusb
sudo pip install pyvisa
sudo pip install pyvisa-py
NOTE: This code contains equipment serial numbers. Use your serial numbers instead.
NOTE: Update the firmware in your instrument to the latest version to avoid unexpected behavior.