Show Python version in "--version" output

This commit is contained in:
Tobias Gruetzmacher 2020-12-24 14:05:48 +01:00
parent b951fa009f
commit 5966e8c523

View file

@ -5,6 +5,7 @@
import argparse import argparse
import contextlib import contextlib
import os import os
import platform
from pathlib import Path from pathlib import Path
import appdirs import appdirs
@ -118,6 +119,8 @@ def setup_options():
def display_version(verbose): def display_version(verbose):
"""Display application name, version, copyright and license.""" """Display application name, version, copyright and license."""
print(configuration.App) print(configuration.App)
print("Using Python {} ({}) on {}".format(platform.python_version(),
platform.python_implementation(), platform.platform()))
print(configuration.Copyright) print(configuration.Copyright)
print(configuration.Freeware) print(configuration.Freeware)
print("For support see", configuration.SupportUrl) print("For support see", configuration.SupportUrl)