src/eric7/Tools/webBrowserSupport.py

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8881
54e42bc2437a
child 9221
bf71ee032bb4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/eric7/Tools/webBrowserSupport.py	Thu Jul 07 11:23:56 2022 +0200
@@ -0,0 +1,25 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2018 - 2022 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Script to determine the supported web browser variant.
+
+It looks for QtWebEngine. It reports the variant found or the string 'None' if
+it is absent.
+"""
+
+import sys
+import contextlib
+
+variant = "None"
+
+with contextlib.suppress(ImportError):
+    from PyQt6 import QtWebEngineWidgets    # __IGNORE_WARNING__
+    variant = "QtWebEngine"
+
+print(variant)      # __IGNORE_WARNING_M801__
+
+sys.exit(0)

eric ide

mercurial