diff options
author | David Howlett <david.howlett3@gmail.com> | 2015-10-28 12:32:09 +0000 |
---|---|---|
committer | David Howlett <david.howlett3@gmail.com> | 2015-10-28 12:32:09 +0000 |
commit | 240f8fc27839be0f89c455251220ec35a61d809a (patch) | |
tree | a672cf65580a7514015e1f57a93045ef41521134 /serial/serialutil.py | |
parent | 0af3b821141b79998df032bd9bfb77aabc22d58c (diff) | |
download | pyserial-git-240f8fc27839be0f89c455251220ec35a61d809a.tar.gz |
added read_all using new API
Diffstat (limited to 'serial/serialutil.py')
-rw-r--r-- | serial/serialutil.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/serial/serialutil.py b/serial/serialutil.py index 5e1e490..150f5f2 100644 --- a/serial/serialutil.py +++ b/serial/serialutil.py @@ -570,6 +570,9 @@ class SerialBase(io.RawIOBase): # - - - - - - - - - - - - - - - - - - - - - - - - # additional functionality + def read_all(self): + return self.read(self.in_waiting) + def read_until(self, terminator=LF, size=None): """\ Read until a termination sequence is found ('\n' by default), the size |