import sys
from PyQt5.QtWidgets import QApplication, QMainWindow
from PyQt5.QtGui import QPixmap
import SerialCommunication
imgLedOff = os.path.join(os.getcwd() + "\\images\\light_off.png")imgLedOn = os.path.join(os.getcwd() + "\\images\\light_on.png")icoLedOn = QPixmap(SerialCommunication.imgLedOn)myPyMainForm.labIndicator.setPixmap(icoLedOn)myPyMainForm.labIndicator.setScaledContents(True)icoLedOff = QPixmap(SerialCommunication.imgLedOff)myPyMainForm.labIndicator.setPixmap(icoLedOff)myPyMainForm.labIndicator.setScaledContents(True)