summaryrefslogtreecommitdiff
path: root/documentation/tools.rst
diff options
context:
space:
mode:
authorChris Liechti <cliechti@gmx.net>2015-12-21 23:40:43 +0100
committerChris Liechti <cliechti@gmx.net>2015-12-21 23:40:43 +0100
commitd32faae184556cba67e51e1c11dd0cc9431e6690 (patch)
tree4211bc2a4f07269e995c6d5ab5fd79a77ede1ab2 /documentation/tools.rst
parent3c8fc3e14c479d8cf5e7e278d0d531a0ceb44317 (diff)
downloadpyserial-git-d32faae184556cba67e51e1c11dd0cc9431e6690.tar.gz
doc update
Diffstat (limited to 'documentation/tools.rst')
-rw-r--r--documentation/tools.rst22
1 files changed, 16 insertions, 6 deletions
diff --git a/documentation/tools.rst b/documentation/tools.rst
index 7bd2304..0c29f81 100644
--- a/documentation/tools.rst
+++ b/documentation/tools.rst
@@ -44,8 +44,8 @@ serial.tools.list_ports``). It also contains the following functions.
Search for ports using a regular expression. Port name, description and
hardware ID are searched (case insensitive). The function returns an
- iterable that contains the same tuples that :func:`comport` generates but
- only those that match the regexp.
+ iterable that contains the same tuples that :func:`comport` generates, but
+ includes only those entries that match the regexp.
.. class:: ListPortInfo
@@ -107,7 +107,8 @@ serial.tools.list_ports``). It also contains the following functions.
text so that the order is "natural" (i.e. ``com1`` < ``com2`` <
``com10``).
-Command line usage
+
+**Command line usage**
Help for ``python -m serial.tools.list_ports``::
@@ -128,14 +129,23 @@ Examples:
- List all ports with details::
- python -m serial.tools.list_ports -v
+ $ python -m serial.tools.list_ports -v
+ /dev/ttyS0
+ desc: ttyS0
+ hwid: PNP0501
+ /dev/ttyUSB0
+ desc: CP2102 USB to UART Bridge Controller
+ hwid: USB VID:PID=10C4:EA60 SER=0001 LOCATION=2-1.6
+ 2 ports found
+
- List the 2nd port matching a USB VID:PID pattern::
- python -m serial.tools.list_ports 1234:5678 -q -n 2
+ $ python -m serial.tools.list_ports 1234:5678 -q -n 2
+ /dev/ttyUSB1
.. versionadded:: 2.6
-.. versionchanged:: 3.0 returning ListPortInfo objects instead of a tuple
+.. versionchanged:: 3.0 returning ``ListPortInfo`` objects instead of a tuple
.. _miniterm: