From 961234d714b29032aca01ae03408e69a45a92863 Mon Sep 17 00:00:00 2001 From: Chris Liechti Date: Sun, 18 Sep 2016 23:54:49 +0200 Subject: [PATCH] docs: extend how-to section, link to old releases --- documentation/appendix.rst | 16 ++++++++++++++-- documentation/pyserial.rst | 2 +- documentation/url_handlers.rst | 2 ++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/documentation/appendix.rst b/documentation/appendix.rst index aff9cdd0..8bc2c1a7 100644 --- a/documentation/appendix.rst +++ b/documentation/appendix.rst @@ -5,10 +5,18 @@ How To ====== -Enable :rfc:`2217` in programs using pySerial. - Patch the code where the :class:`serial.Serial` is instantiated. Replace +Enable :rfc:`2217` (and other URL handlers) in programs using pySerial. + Patch the code where the :class:`serial.Serial` is instantiated. + E.g. replace:: + + s = serial.Serial(...) + it with:: + s = serial.serial_for_url(...) + + or for backwards compatibility to old pySerial installations:: + try: s = serial.serial_for_url(...) except AttributeError: @@ -33,6 +41,10 @@ Test your setup. on the screen, then at least RX and TX work (they still could be swapped though). + There is also a ``spy:://`` URL handler. It prints all calls (read/write, + control lines) to the serial port to a file or stderr. See :ref:`spy` + for details. + FAQ === diff --git a/documentation/pyserial.rst b/documentation/pyserial.rst index f0633855..602134d2 100644 --- a/documentation/pyserial.rst +++ b/documentation/pyserial.rst @@ -124,7 +124,7 @@ win32all). WinXP is supported up to 3.0.1. .. _`old download`: https://sourceforge.net/projects/pyserial/files/pyserial/ -.. _download: https://pypi.python.org/pypi/pyserial +.. _download: https://pypi.python.org/simple/pyserial/ .. _pywin32: http://pypi.python.org/pypi/pywin32 .. _`2.7`: https://pypi.python.org/pypi/pyserial/2.7 .. _`1.21`: https://sourceforge.net/projects/pyserial/files/pyserial/1.21/pyserial-1.21.zip/download diff --git a/documentation/url_handlers.rst b/documentation/url_handlers.rst index ae331f9c..81e6ff8a 100644 --- a/documentation/url_handlers.rst +++ b/documentation/url_handlers.rst @@ -122,6 +122,8 @@ Supported options in the URL are: not locked automatically (e.g. Posix). +.. _spy: + ``spy://`` ========== Wrapping the native serial port, this protocol makes it possible to