Skip to main content

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


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)

Uploaded Source

Built Distribution

lsports-0.1.0-py3-none-any.whl (17.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page