소스 검색

add helper file to list com ports with a LOCATION entry

Noah Vogt 1 개월 전
부모
커밋
44a228980f
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      ls_com_ports.py

+ 5 - 0
ls_com_ports.py

@@ -0,0 +1,5 @@
+from serial.tools import list_ports
+
+for port in list_ports.comports():
+    if "LOCATION=" in port.hwid:
+        print(port.hwid)