Installed Python 3.7.3 on my W10 machine and wanted to ensure it was already installed.
In order to do it, when to the command prompt and ran the following command
python -v
The output was not what i was expecting...
import _frozen_importlib # frozen
import _imp # builtin
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
# installing zipimport hook
import 'zipimport' # <class '_frozen_importlib.BuiltinImporter'>
# installed zipimport hook
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'nt' # <class '_frozen_importlib.BuiltinImporter'>
import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import 'winreg' # <class '_frozen_importlib.BuiltinImporter'>
# C:\Program Files\Python37\lib\encodings\__pycache__\__init__.cpython-37.pyc matches C:\Program Files\Python37\lib\encodings\__init__.py
# code object from 'C:\\Program Files\\Python37\\lib\\encodings\\__pycache__\\__init__.cpython-37.pyc'
# C:\Program Files\Python37\lib\__pycache__\codecs.cpython-37.pyc matches C:\Program Files\Python37\lib\codecs.py
# code object from 'C:\\Program Files\\Python37\\lib\\__pycache__\\codecs.cpython-37.pyc'
import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FACF251D0>
# C:\Program Files\Python37\lib\encodings\__pycache__\aliases.cpython-37.pyc matches C:\Program Files\Python37\lib\encodings\aliases.py
# code object from 'C:\\Program Files\\Python37\\lib\\encodings\\__pycache__\\aliases.cpython-37.pyc'
import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FACF3BCF8>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FACF19588>
# C:\Program Files\Python37\lib\encodings\__pycache__\utf_8.cpython-37.pyc matches C:\Program Files\Python37\lib\encodings\utf_8.py
# code object from 'C:\\Program Files\\Python37\\lib\\encodings\\__pycache__\\utf_8.cpython-37.pyc'
import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FACF4BDA0>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
# C:\Program Files\Python37\lib\encodings\__pycache__\latin_1.cpython-37.pyc matches C:\Program Files\Python37\lib\encodings\latin_1.py
# code object from 'C:\\Program Files\\Python37\\lib\\encodings\\__pycache__\\latin_1.cpython-37.pyc'
import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FACF4F208>
# C:\Program Files\Python37\lib\__pycache__\io.cpython-37.pyc matches C:\Program Files\Python37\lib\io.py
# code object from 'C:\\Program Files\\Python37\\lib\\__pycache__\\io.cpython-37.pyc'
# C:\Program Files\Python37\lib\__pycache__\abc.cpython-37.pyc matches C:\Program Files\Python37\lib\abc.py
# code object from 'C:\\Program Files\\Python37\\lib\\__pycache__\\abc.cpython-37.pyc'
import '_abc' # <class '_frozen_importlib.BuiltinImporter'>
import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FACF4F7B8>
import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FACF4F400>
# C:\Program Files\Python37\lib\__pycache__\site.cpython-37.pyc matches C:\Program Files\Python37\lib\site.py
# code object from 'C:\\Program Files\\Python37\\lib\\__pycache__\\site.cpython-37.pyc'
# C:\Program Files\Python37\lib\__pycache__\os.cpython-37.pyc matches C:\Program Files\Python37\lib\os.py
# code object from 'C:\\Program Files\\Python37\\lib\\__pycache__\\os.cpython-37.pyc'
# C:\Program Files\Python37\lib\__pycache__\stat.cpython-37.pyc matches C:\Program Files\Python37\lib\stat.py
# code object from 'C:\\Program Files\\Python37\\lib\\__pycache__\\stat.cpython-37.pyc'
import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FAEBC9A58>
# C:\Program Files\Python37\lib\__pycache__\ntpath.cpython-37.pyc matches C:\Program Files\Python37\lib\ntpath.py
# code object from 'C:\\Program Files\\Python37\\lib\\__pycache__\\ntpath.cpython-37.pyc'
# C:\Program Files\Python37\lib\__pycache__\genericpath.cpython-37.pyc matches C:\Program Files\Python37\lib\genericpath.py
# code object from 'C:\\Program Files\\Python37\\lib\\__pycache__\\genericpath.cpython-37.pyc'
import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FAEBD6908>
import 'ntpath' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FAEBD0128>
# C:\Program Files\Python37\lib\__pycache__\_collections_abc.cpython-37.pyc matches C:\Program Files\Python37\lib\_collections_abc.py
# code object from 'C:\\Program Files\\Python37\\lib\\__pycache__\\_collections_abc.cpython-37.pyc'
import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FAEBD6EF0>
import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FACF5F668>
# C:\Program Files\Python37\lib\__pycache__\_sitebuiltins.cpython-37.pyc matches C:\Program Files\Python37\lib\_sitebuiltins.py
# code object from 'C:\\Program Files\\Python37\\lib\\__pycache__\\_sitebuiltins.cpython-37.pyc'
import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FACF5FA20>
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x0000014FACF532B0>
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
>>>
Well, it's possible to read the version in the 4th line counting from the bottom. Still, why it didn't just show the version?