List serial ports.
Project description
lsports
A simple Python 3.7+ module to list serial ports on Windows, Linux, and macOS.
This is a modified version of serial.tools.list_ports
from
pySerial by Chris Liechti.
Installation
pip install lsports
Usage
The module provides a single function comports
that returns a list of PortInfo
objects.
Each PortInfo
object contains information about a connected serial port.
from lsports import comports
for port in comports():
print(port.device, port.product, port.hwid)
For a full list of available attributes, see the PortInfo
class. Only comports
and PortInfo
are considered public API.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lsports-0.1.0.tar.gz
(13.6 kB
view hashes)
Built Distribution
lsports-0.1.0-py3-none-any.whl
(17.1 kB
view hashes)