Преглед изворни кода

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)