Created
March 12, 2021 16:13
-
-
Save figital/b7b3e8b6b5c006968def2016dca03a88 to your computer and use it in GitHub Desktop.
list serial ports on windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial.tools.list_ports | |
from pprint import pprint | |
ports = serial.tools.list_ports.comports() | |
print("\n" * 2) | |
for port in ports: | |
pprint(vars(port)) | |
print("-----------------------------------") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment