9 |
9 |
10 import os |
10 import os |
11 import sys |
11 import sys |
12 import json |
12 import json |
13 import xml.etree.ElementTree # secok |
13 import xml.etree.ElementTree # secok |
|
14 import contextlib |
14 |
15 |
15 try: |
16 try: |
16 from PyQt6.QtCore import QMetaMethod, QByteArray |
17 from PyQt6.QtCore import QMetaMethod, QByteArray |
17 from PyQt6.QtGui import QAction |
18 from PyQt6.QtGui import QAction |
18 from PyQt6.QtWidgets import QWidget, QApplication |
19 from PyQt6.QtWidgets import QWidget, QApplication |
19 from PyQt6 import uic |
20 from PyQt6 import uic |
20 except ImportError: |
21 except ImportError: |
21 print("PyQt6 could not be found.") |
22 print("PyQt6 could not be found.") |
22 sys.exit(1) |
23 sys.exit(1) |
23 |
24 |
24 try: |
25 with contextlib.suppress(ImportError): |
25 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ |
26 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ |
26 except ImportError: |
|
27 pass |
|
28 |
27 |
29 sys.path.append(os.path.dirname(os.path.dirname(__file__))) |
28 sys.path.append(os.path.dirname(os.path.dirname(__file__))) |
30 # add the eric package directory |
29 # add the eric package directory |
31 |
30 |
32 |
31 |