What purpose does the sys module have in use with PyQt After all, in fact, it can work without it.
Example of use with sys
import sys from PyQt5.QtWidgets import * class Ex(QWidget): def __init__(self): super().__init__() self.setWindowTitle('Тест') self.resize(400, 400) if __name__ == '__main__': app = QApplication(sys.argv) main = Ex() main.show() sys.exit(app.exec_()) Example using without sys :
from PyQt5.QtWidgets import * class Ex(QWidget): def __init__(self): super().__init__() self.setWindowTitle('Тест') self.resize(400, 400) if __name__ == '__main__': app = QApplication([]) main = Ex() main.show() app.exec() What is the point of using this module?