diff options
author | Chris Liechti <cliechti@gmx.net> | 2015-08-17 03:24:34 +0200 |
---|---|---|
committer | Chris Liechti <cliechti@gmx.net> | 2015-08-17 03:24:34 +0200 |
commit | cd42db984c56b3e6321070ad15050fdb2c33c7a0 (patch) | |
tree | 88e3a091bac2ce9f567b698966cc34d2f89e3acf /examples | |
parent | 2880f0ecf58f781ca37cdbdebf481dc4d5a27f95 (diff) | |
download | pyserial-git-cd42db984c56b3e6321070ad15050fdb2c33c7a0.tar.gz |
rfc2217_server: use serial_for_url to allow loop:// hwgrep:// etc
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/rfc2217_server.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/rfc2217_server.py b/examples/rfc2217_server.py index a8685f4..53f11b4 100755 --- a/examples/rfc2217_server.py +++ b/examples/rfc2217_server.py @@ -142,8 +142,7 @@ it waits for the next connect. logging.getLogger('rfc2217').setLevel(level) # connect to serial port - ser = serial.Serial() - ser.port = args.SERIALPORT + ser = serial.serial_for_url(args.SERIALPORT, do_not_open=True) ser.timeout = 3 # required so that the reader thread can exit logging.info("RFC 2217 TCP/IP to Serial redirector - type Ctrl-C / BREAK to quit") |