src/eric7/Tools/webBrowserSupport.py

Tue, 10 Dec 2024 15:46:34 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 10 Dec 2024 15:46:34 +0100
branch
eric7
changeset 11090
f5f5f5803935
parent 10496
f9925e08dbce
child 11148
15e30f0c76a8
permissions
-rw-r--r--

Updated copyright for 2025.

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

# Copyright (c) 2018 - 2025 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.util
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