| 7 try: |
7 try: |
| 8 from pygpibtoolkit.gpibcontroller import GPIBController |
8 from pygpibtoolkit.gpibcontroller import GPIBController |
| 9 except ImportError: |
9 except ImportError: |
| 10 sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) |
10 sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) |
| 11 from pygpibtoolkit.gpibcontroller import GPIBController |
11 from pygpibtoolkit.gpibcontroller import GPIBController |
| |
12 import pygpibtoolkit.HP3562A |
| 12 |
13 |
| 13 def main(): |
14 def main(): |
| 14 import optparse |
15 import optparse |
| 15 opt = optparse.OptionParser("A simple tool for detecting connected GPIB devices") |
16 opt = optparse.OptionParser("A simple tool for detecting connected GPIB devices") |
| 16 opt.add_option('-d', '--device', default="/dev/ttyUSB0", |
17 opt.add_option('-d', '--device', default="/dev/ttyUSB0", |