Wed, 22 Nov 2023 17:19:10 +0100
Modernized some code and corrected some code style issues.
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2018 - 2023 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)