Skip to content

Commit ceeacb0

Browse files
committed
set baudrate and use the current filename in the help message
1 parent 523693e commit ceeacb0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

examples/hp6632b_serial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
if __name__ == "__main__":
1111
if len(sys.argv) < 2:
12-
print("run with python -i hp6632b.py /dev/ttyUSB0")
12+
print(f"run with python -i {__file__} /dev/ttyUSB0")
1313
sys.exit(1)
1414
# Then put to interactive mode
1515
os.environ["PYTHONINSPECT"] = "1"
16-
aiodev = hp6632b.rs232(sys.argv[1], rtscts=True)
16+
aiodev = hp6632b.rs232(sys.argv[1], rtscts=True, baudrate=9600)
1717
dev = AIOWrapper(aiodev)
1818

1919
atexit.register(dev.quit)

examples/prologix_usb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
if __name__ == "__main__":
1212
if len(sys.argv) < 2:
13-
print("run with python -i hp6632b.py /dev/ttyUSB0")
13+
print(f"run with python -i {__file__} /dev/ttyUSB0")
1414
sys.exit(1)
1515
# Then put to interactive mode
1616
os.environ["PYTHONINSPECT"] = "1"

0 commit comments

Comments
 (0)