How to specify version in only one place when using pyproject.toml?

After you have installed your project – either in editable mode by poetry install or from the wheel – you can access several metadata via importlib.metadata (importlib_metadata for python < 3.8). So keep the version only in the pyproject.toml and use this in your python code: import importlib.metadata __version__ = importlib.metadata.version(“mypackage”)

How do I find the installed .NET versions?

There is an easier way to get the exact version .NET version installed on your machine from a cmd prompt. Just follow the following instructions; Open the command prompt (i.e Windows + R → type “cmd”). Type the following command, all on one line: reg query “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP” (This will list all the .NET … Read more

Best way to find the OS name and version on a Unix/Linux platform

This work fine for all Linux environments. #!/bin/sh cat /etc/*-release In Ubuntu: $ cat /etc/*-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION=”Ubuntu 10.04.4 LTS” Or Ubuntu 12.04 (Precise Pangolin): $ cat /etc/*-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION=”Ubuntu 12.04.4 LTS” NAME=”Ubuntu” VERSION=”12.04.4 LTS, Precise Pangolin” ID=ubuntu ID_LIKE=debian PRETTY_NAME=”Ubuntu precise (12.04.4 LTS)” VERSION_ID=”12.04″ In RHEL: $ cat /etc/*-release Red Hat Enterprise … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)