summaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
authorRob Gaddi <rgaddi@highlandtechnology.com>2017-02-24 11:51:37 -0800
committerRob Gaddi <rgaddi@highlandtechnology.com>2017-02-24 11:51:37 -0800
commit06db381f702e8ea0700a2c6bb262ef4bad3e4233 (patch)
treeef9ae1981c4efbd503a1cb39fd63320605504925 /documentation
parentfd59ad4446f754d2f2d3eacd82177b77cd4eedde (diff)
parentf956057b989e7575492b792e9ee476b19bf4fbc3 (diff)
downloadpyserial-git-06db381f702e8ea0700a2c6bb262ef4bad3e4233.tar.gz
Merge branch 'master' into v3.2.1-rg
Diffstat (limited to 'documentation')
-rw-r--r--documentation/appendix.rst8
-rw-r--r--documentation/examples.rst4
-rw-r--r--documentation/pyserial_api.rst8
-rw-r--r--documentation/shortintro.rst4
-rw-r--r--documentation/tools.rst2
-rw-r--r--documentation/url_handlers.rst11
6 files changed, 28 insertions, 9 deletions
diff --git a/documentation/appendix.rst b/documentation/appendix.rst
index 8bc2c1a..80ade6d 100644
--- a/documentation/appendix.rst
+++ b/documentation/appendix.rst
@@ -91,6 +91,14 @@ User supplied URL handlers
so running ``sudo adduser $USER dialout`` (and logging-out and -in) enables
the user to access the port.
+Support for Python 2.6 or earlier
+ Support for older Python releases than 2.7 will not return to pySerial 3.x.
+ Python 2.7 is now many years old (released 2010). If you insist on using
+ Python 2.6 or earlier, it is recommend to use pySerial `2.7`_
+ (or any 2.x version).
+
+.. _`2.7`: https://pypi.python.org/pypi/pyserial/2.7
+
Related software
================
diff --git a/documentation/examples.rst b/documentation/examples.rst
index 019ffc1..787fd00 100644
--- a/documentation/examples.rst
+++ b/documentation/examples.rst
@@ -82,7 +82,7 @@ portable (runs on POSIX, Windows, etc).
using :rfc:`2217` requests. The status lines (DSR/CTS/RI/CD) are polled every
second and notifications are sent to the client.
- Telnet character IAC (0xff) needs to be doubled in data stream. IAC followed
- by an other value is interpreted as Telnet command sequence.
+ by another value is interpreted as Telnet command sequence.
- Telnet negotiation commands are sent when connecting to the server.
- RTS/DTR are activated on client connect and deactivated on disconnect.
- Default port settings are set again when client disconnects.
@@ -187,7 +187,7 @@ Installation as daemon:
- Copy the script ``port_publisher.py`` to ``/usr/local/bin``.
- Copy the script ``port_publisher.sh`` to ``/etc/init.d``.
- Add links to the runlevels using ``update-rc.d port_publisher.sh defaults 99``
-- Thats it :-) the service will be started on next reboot. Alternatively run
+- That's it :-) the service will be started on next reboot. Alternatively run
``invoke-rc.d port_publisher.sh start`` as root.
.. versionadded:: 2.5 new example
diff --git a/documentation/pyserial_api.rst b/documentation/pyserial_api.rst
index 3887204..54d2ff3 100644
--- a/documentation/pyserial_api.rst
+++ b/documentation/pyserial_api.rst
@@ -498,6 +498,8 @@ Native ports
.. versionchanged:: 3.0 renamed from ``applySettingsDict``
+ .. _context-manager:
+
This class can be used as context manager. The serial port is closed when
the context is left.
@@ -579,7 +581,7 @@ Native ports
:platform: Posix
:platform: Windows
- Cancel a pending read operation from an other thread. A blocking
+ Cancel a pending read operation from another thread. A blocking
:meth:`read` call is aborted immediately. :meth:`read` will not report
any error but return all data received up to that point (similar to a
timeout).
@@ -593,7 +595,7 @@ Native ports
:platform: Posix
:platform: Windows
- Cancel a pending write operation from an other thread. The
+ Cancel a pending write operation from another thread. The
:meth:`write` method will return immediately (no error indicated).
However the OS may still be sending from the buffer, a separate call to
:meth:`reset_output_buffer` may be needed.
@@ -1260,7 +1262,7 @@ asyncio
``asyncio`` was introduced with Python 3.4. Experimental support for pySerial
is provided via a separate distribution `pyserial-asyncio`_.
-It is currently under developement, see:
+It is currently under development, see:
- http://pyserial-asyncio.readthedocs.io/
- https://github.com/pyserial/pyserial-asyncio
diff --git a/documentation/shortintro.rst b/documentation/shortintro.rst
index 8f33a68..02385d9 100644
--- a/documentation/shortintro.rst
+++ b/documentation/shortintro.rst
@@ -44,9 +44,9 @@ Get a Serial instance and configure/open it later::
>>> ser.is_open
False
-Also supported with context manager::
+Also supported with :ref:`context manager <context-manager>`::
- serial.Serial() as ser:
+ with serial.Serial() as ser:
ser.baudrate = 19200
ser.port = 'COM1'
ser.open()
diff --git a/documentation/tools.rst b/documentation/tools.rst
index 45e7aef..437a884 100644
--- a/documentation/tools.rst
+++ b/documentation/tools.rst
@@ -97,7 +97,7 @@ serial.tools.list_ports``). It also contains the following functions.
.. attribute:: interface
- Interface specifc description, e.g. used in compound USB devices.
+ Interface specific description, e.g. used in compound USB devices.
Comparison operators are implemented such that the :obj:`ListPortInfo` objects
can be sorted by ``device``. Strings are split into groups of numbers and
diff --git a/documentation/url_handlers.rst b/documentation/url_handlers.rst
index 81e6ff8..adacc2e 100644
--- a/documentation/url_handlers.rst
+++ b/documentation/url_handlers.rst
@@ -197,6 +197,15 @@ Outputs::
000002.284 RX 00F0 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF ................
000002.284 BRK send_break 0.25
+Another example, on POSIX, open a second terminal window and find out it's
+device (e.g. with the ``ps`` command in the TTY column), assumed to be
+``/dev/pts/2`` here, double quotes are used so that the ampersand in the URL is
+not interpreted by the shell::
+
+ python -m serial.tools.miniterm "spy:///dev/ttyUSB0?file=/dev/pts/2&color" 115200
+
+The spy output will be live in the second terminal window.
+
.. versionadded:: 3.0
@@ -204,7 +213,7 @@ Outputs::
==========
This handler allows to select alternate implementations of the native serial port.
-Currently only the Posix platform provides alternative implementations.
+Currently only the POSIX platform provides alternative implementations.
``PosixPollSerial``
Poll based read implementation. Not all systems support poll properly.