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 | 9ca757d10f6c30eae280dcd7ae5369ff64691097 (patch) | |
tree | 7614b9089d3e9b20dd776a637f5bb21fe13f7166 /serial/serialutil.py | |
parent | dcae0b6addde10def3f70b3e837fefee66c0a4bf (diff) | |
download | pyserial-9ca757d10f6c30eae280dcd7ae5369ff64691097.tar.gz |
update compatibility code for 2.6
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@260 f19166aa-fa4f-0410-85c2-fa1106f25c8a
Diffstat (limited to 'serial/serialutil.py')
-rw-r--r-- | serial/serialutil.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/serial/serialutil.py b/serial/serialutil.py index ee115e6..e568aa1 100644 --- a/serial/serialutil.py +++ b/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: |