src/eric7/Tools/webBrowserSupport.py

Sat, 23 Dec 2023 15:48:12 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 23 Dec 2023 15:48:12 +0100
branch
eric7
changeset 10439
21c28b0f9e41
parent 10331
c1a2ff7e3575
child 10496
f9925e08dbce
permissions
-rw-r--r--

Updated copyright for 2024.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Copyright (c) 2018 - 2024 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 importlib
import sys

variant = (
    "QtWebEngine"
    if (
        bool(importlib.util.find_spec("PyQt6"))
        and bool(importlib.util.find_spec("PyQt6.QtWebEngineWidgets"))
    )
    else "None"
)
print(variant)  # noqa: M801

sys.exit(0)

eric ide

mercurial