Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cli_tool: new parameter for checking ESR

If --always-check-esr is enabled, the tool will check the error status
register after every command and print a warning if there was an error.

Signed-off-by: Michael Walle <>
  • Loading branch information...
commit e81b6153992556ecf21a223176726493f8c73007 1 parent 6d6c218
Michael Walle authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 pyvxi11/
7 pyvxi11/
@@ -53,6 +53,9 @@ def main():
help='be more verbose')
parser.add_option('-V', action='store_true', dest='version',
help='show version')
+ parser.add_option('--always-check-esr', action='store_true',
+ dest='check_esr',
+ help='Check the error status register after every command')
(options, args) = parser.parse_args()
@@ -91,6 +94,10 @@ def main():
print v.ask(cmd)
+ if options.check_esr:
+ esr = int(v.ask('*ESR?').strip())
+ if esr != 0:
+ print 'Warning: ESR was %d' % esr
except Vxi11Error, e:
print 'ERROR: %s' % e
except EOFError:
Please sign in to comment.
Something went wrong with that request. Please try again.