diff options
author | zsquareplusc <cliechti@gmx.net> | 2021-12-05 19:39:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-05 19:39:29 +0100 |
commit | 31fa4807d73ed4eb9891a88a15817b439c4eea2d (patch) | |
tree | 8a28a0f2ffcd1afde7be796b6d219dd4368d5dba /documentation | |
parent | f7e39f06bd8365db331288928ccd9c47e7dd6a60 (diff) | |
parent | 2e3ac97e07024c272c60c3f18bec48f181dac0a4 (diff) | |
download | pyserial-git-master.tar.gz |
docs: \n was not in inline mode, causing the backslash to be escaped
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/shortintro.rst | 6 |
1 files 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 <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 |