Created
November 28, 2017 18:23
-
-
Save tdierks/0128d9ecc376c9adc6c84be1b1a3d191 to your computer and use it in GitHub Desktop.
Revisions
-
tdierks created this gist
Nov 28, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/usr/bin/python -u # Use: modem-speed.py [baud, default 1200] import sys from time import sleep baud = len(sys.argv) > 1 and int(sys.argv[1]) or 1200 cps = baud/10.0 # 10 baud per octet at 8n1 while True: c = sys.stdin.read(1) if c == "": break sys.stdout.write(c) sleep(1.0/cps)