Install steps :
1. Install Python 2.7.13 from here , and set environment .
2. Install NI-488.2 and NI-VISA from the here .
3. Install PyVisa fromhere.
Setup GPIB and Usage:
import visa
dcel = visa.instrument('GPIB::12::INSTR')
print dcel.ask('*idn?')
if success, we can use it control DC ON/OFF , set voltage , get current . so on ...
Refer To :
https://sourceforge.net/projects/pyvisa/
http://pyvisa.readthedocs.io/en/latest/
Agilent instrument user guide .