|
1 #!/usr/bin/env python3 |
|
2 # -*- coding: utf-8 -*- |
|
3 |
|
4 # Copyright (c) 2018 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> |
|
5 # |
|
6 |
|
7 """ |
|
8 Script to determine the supported web browser variant. |
|
9 |
|
10 It looks for QtWebEngine. It reports the variant found or the string 'None' if |
|
11 it is absent. |
|
12 """ |
|
13 |
|
14 import sys |
|
15 import contextlib |
|
16 |
|
17 variant = "None" |
|
18 |
|
19 with contextlib.suppress(ImportError): |
|
20 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__ |
|
21 variant = "QtWebEngine" |
|
22 |
|
23 print(variant) # __IGNORE_WARNING_M801__ |
|
24 |
|
25 sys.exit(0) |