Найти - Пользователи
Полная версия: Как узнать версию
Начало » Python для экспертов » Как узнать версию
1
nxx
Глупый наверное вопрос, но…
как узнать версию python ?
в смысле какая функция возвращает версию ?
Ferroman
version
A string containing the version number of the Python interpreter plus additional information on the build number and compiler used. It has a value of the form 'version (#build_number, build_date, build_time) '. The first three characters are used to identify the version in the installation directories (where appropriate on each platform). An example:
>>> import sys
>>> sys.version
'1.5.2 (#0 Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)]'
Или еще лучше (удобнее для разбора)

version_info
A tuple containing the five components of the version number: major, minor, micro, releaselevel, and serial. All values except releaselevel are integers; the release level is ‘alpha’, ‘beta’, ‘candidate’, or ‘final’. The version_info value corresponding to the Python version 2.0 is (2, 0, 0, ‘final’, 0). New in version 2.0.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB