Display an introduction message when running gpib_detect.

Fri, 22 Aug 2008 07:05:11 +0200

author
David Douard <david.douard@logilab.fr>
date
Fri, 22 Aug 2008 07:05:11 +0200
changeset 70
4cd8edd2b4e7
parent 69
879083ec2355
child 71
aedebef96a5b

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()

mercurial