Skip to content

Commit

Permalink
docs: extend how-to section, link to old releases
Browse files Browse the repository at this point in the history
  • Loading branch information
zsquareplusc committed Sep 18, 2016
1 parent 2a7ed53 commit 961234d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
16 changes: 14 additions & 2 deletions documentation/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
===
Expand Down
2 changes: 1 addition & 1 deletion documentation/pyserial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions documentation/url_handlers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 961234d

Please sign in to comment.