themeZed/themezed/__main__.py

23 lines
741 B
Python
Raw Permalink Normal View History

# import qt stuff
2023-12-11 05:27:08 +01:00
import PyQt6.QtCore # TODO: only import classes and methods needed to reduce mem usage
2023-12-19 00:53:10 +01:00
def print_ver() -> None: # TODO: maybe find a better way to do this?
import platform
from importlib.metadata import version, PackageNotFoundError
tzv = ""
try:
tzv = version("themezed")
except PackageNotFoundError:
import tomllib
with open("./pyproject.toml","rb") as f:
tzv = tomllib.load(f)["tool"]["poetry"]["version"]
print("Theme-ZED - Version {}\n\nRunning on Python ({}) {}, using\n\tPyQt\t{}".format(
tzv,
platform.python_implementation(),platform.python_version(),
PyQt6.QtCore.PYQT_VERSION_STR
))
2023-12-11 05:27:08 +01:00
# TODO: actually do stuff
print_ver()