With a Datron 1271 having "problems" (including a broken right-side display), here is a Python script to use PYVISA and GBIB to read the device dependent error list.
import pyvisa
import time
visa = pyvisa.ResourceManager()
DT1271 = visa.open_resource('GPIB0::2::INSTR')
DT1271.timeout =20000
#DT1271.write('CNFTST?') #run confidence test
input() # to give time to run test
error = 9999
while int(error) > 0:
error = DT1271.query('DDQ?')
print (str(error))
time.sleep(0)
print (DT1271.query('*IDN?'))
DT1271.close()
The CNFTST? command is in the Datron_UserManual_Issue1 on page 5-65 (BIG THANKS to xdevs for the source)
This will probably work for the full test, etc. but not tested yet.