diff options
author | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2009-07-30 17:23:42 +0000 |
---|---|---|
committer | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2009-07-30 17:23:42 +0000 |
commit | 0bbebbfa46daa115dd7f0fb38e6974578e7e6df3 (patch) | |
tree | 7402d06b1f79ff252770eec1b4fb68fa43943264 | |
parent | 42007d3035be3bb56ac5e98050e719704f34b5da (diff) | |
download | pyserial-git-0bbebbfa46daa115dd7f0fb38e6974578e7e6df3.tar.gz |
update compatibility code for 2.6
-rw-r--r-- | pyserial/serial/serialutil.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pyserial/serial/serialutil.py b/pyserial/serial/serialutil.py index ee115e6..e568aa1 100644 --- a/pyserial/serial/serialutil.py +++ b/pyserial/serial/serialutil.py @@ -25,6 +25,10 @@ except (NameError, AttributeError): list.append(self, item) else: list.append(self, chr(item)) + +# create control bytes, depending on true type of bytes +# all Python versions prior 3.x convert str([17]) to '[17]' instead of '\x11' +if bytes is str: XON = chr(17) XOFF = chr(19) else: |