In 1975 the IEEE created the IEEE-488-1975 standard, describing a digital communication bus, sometimes refered to as GPIB. It was revised in 1978. It described the hardware interface, but not the format of the commands and the data. In 1987 they introduced the IEEE-488.2-1987 standard describing Standard Codes, Formats, Protocols, and Common Commands.
Now back to your problem.
pyvisas visa.GpibInstrument
class has a property called stb
which you can use to access the status byte.
From the source:
@property
def stb(self):
"""Service request status register."""
return vpp43.read_stb(self.vi)
So you can simply do
instrument = visa.instrument('GPIB::01') # Assuming a GPIB device on channel 1
print instrument.stb # Print status register
If your device conforms to IEEE-488.2, you have one more option. You can send the common command *STB?
instrument = visa.instrument('GPIB::01') # Assuming a GPIB device on channel 1
print instrument.ask('*STB?') # Print status register