From 2e3ac97e07024c272c60c3f18bec48f181dac0a4 Mon Sep 17 00:00:00 2001 From: spmvg <13852721+spmvg@users.noreply.github.com> Date: Sun, 5 Dec 2021 00:27:03 +0100 Subject: \n was not in inline mode, causing the backslash to be escaped --- documentation/shortintro.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/shortintro.rst b/documentation/shortintro.rst index 11b2ea0..2c40519 100644 --- a/documentation/shortintro.rst +++ b/documentation/shortintro.rst @@ -57,16 +57,16 @@ Also supported with :ref:`context manager `:: Readline ======== -:meth:`readline` reads up to one line, including the `\n` at the end. +:meth:`readline` reads up to one line, including the ``\n`` at the end. Be careful when using :meth:`readline`. Do specify a timeout when opening the serial port otherwise it could block forever if no newline character is -received. If the `\n` is missing in the return value, it returned on timeout. +received. If the ``\n`` is missing in the return value, it returned on timeout. :meth:`readlines` tries to read "all" lines which is not well defined for a serial port that is still open. Therefore :meth:`readlines` depends on having a timeout on the port and interprets that as EOF (end of file). It raises an exception if the port is not opened correctly. The returned list of lines do -not include the `\n`. +not include the ``\n``. Both functions call :meth:`read` to get their data and the serial port timeout is acting on this function. Therefore the effective timeout, especially for -- cgit v1.2.1