Fri, 22 Aug 2008 07:05:11 +0200
Display an introduction message when running gpib_detect.
bin/gpib_detect | file | annotate | diff | comparison | revisions |
--- a/bin/gpib_detect Thu Aug 21 19:53:22 2008 +0200 +++ b/bin/gpib_detect Fri Aug 22 07:05:11 2008 +0200 @@ -19,16 +19,18 @@ help="Device of connected Prologix GPIB bundle [/dev/ttyUSB0]",) options, argv = opt.parse_args(sys.argv) + print "Detecting GPIB devices on the bus. Please wait until completion." c = GPIBController(device=options.device) signal.signal(signal.SIGINT, c.stop) signal.signal(signal.SIGQUIT, c.stop) time.sleep(1) devices = c.detect_devices() - print "Found devices:" + c.stop() + + print "GPIB devices:" for k in sorted(devices.keys()): print "%-3d: %s"%(k, devices[k]) - c.stop() if __name__ == "__main__": main()