Skip to content

Commit 22d3900

Browse files
committed
docs: add notes for readline, readlines, writelines, IOBase
see pyserial#285
1 parent 8e45873 commit 22d3900

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

documentation/pyserial_api.rst

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,18 @@ Native ports
465465

466466
.. versionadded:: 2.5
467467

468+
.. method:: readline(size=-1)
469+
470+
Provided via :meth:`io.IOBase.readline`
471+
472+
.. method:: readlines(hint=-1)
473+
474+
Provided via :meth:`io.IOBase.readlines`
475+
476+
.. method:: writelines(lines)
477+
478+
Provided via :meth:`io.IOBase.writelines`
479+
468480
The port settings can be read and written as dictionary. The following
469481
keys are supported: ``write_timeout``, ``inter_byte_timeout``,
470482
``dsrdtr``, ``baudrate``, ``timeout``, ``parity``, ``bytesize``,
@@ -706,8 +718,9 @@ Native ports
706718

707719

708720
Implementation detail: some attributes and functions are provided by the
709-
class :class:`SerialBase` and some by the platform specific class and
710-
others by the base class mentioned above.
721+
class :class:`serial.SerialBase` which inherits from :class:`io.RawIOBase`
722+
and some by the platform specific class and others by the base class
723+
mentioned above.
711724

712725

713726
RS485 support

serial/serialposix.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,9 @@ class VTIMESerial(Serial):
789789
the error handling is degraded.
790790
791791
Overall timeout is disabled when inter-character timeout is used.
792+
793+
Note that this implementation does NOT support cancel_read(), it will
794+
just ignore that.
792795
"""
793796

794797
def _reconfigure_port(self, force_update=True):

0 commit comments

Comments
 (0)