10 import contextlib |
10 import contextlib |
11 import os |
11 import os |
12 import shutil |
12 import shutil |
13 |
13 |
14 from PyQt6.QtCore import QCoreApplication, QEventLoop, Qt, QThread, pyqtSlot |
14 from PyQt6.QtCore import QCoreApplication, QEventLoop, Qt, QThread, pyqtSlot |
|
15 from PyQt6.QtSerialPort import QSerialPortInfo |
15 from PyQt6.QtWidgets import QDialog |
16 from PyQt6.QtWidgets import QDialog |
16 |
17 |
17 from eric7 import Utilities |
18 from eric7 import Utilities |
18 from eric7.EricGui import EricPixmapCache |
19 from eric7.EricGui import EricPixmapCache |
19 from eric7.EricWidgets.EricApplication import ericApp |
20 from eric7.EricWidgets.EricApplication import ericApp |
598 @type str |
599 @type str |
599 @return list of tuples with the board type, the port description, the |
600 @return list of tuples with the board type, the port description, the |
600 VID and PID |
601 VID and PID |
601 @rtype list of tuple of (str, str, int, int) |
602 @rtype list of tuple of (str, str, int, int) |
602 """ |
603 """ |
603 from PyQt6.QtSerialPort import QSerialPortInfo |
|
604 |
|
605 foundDevices = [] |
604 foundDevices = [] |
606 |
605 |
607 availablePorts = QSerialPortInfo.availablePorts() |
606 availablePorts = QSerialPortInfo.availablePorts() |
608 for port in availablePorts: |
607 for port in availablePorts: |
609 vid = port.vendorIdentifier() |
608 vid = port.vendorIdentifier() |