Returns the Python version as string 'major.minor.patchlevel' Note that unlike the Python sys.version, the returned value will always include the patchlevel (it defaults to 0).
()
| 1117 | return _sys_version()[0] |
| 1118 | |
| 1119 | def python_version(): |
| 1120 | |
| 1121 | """ Returns the Python version as string 'major.minor.patchlevel' |
| 1122 | |
| 1123 | Note that unlike the Python sys.version, the returned value |
| 1124 | will always include the patchlevel (it defaults to 0). |
| 1125 | |
| 1126 | """ |
| 1127 | return _sys_version()[1] |
| 1128 | |
| 1129 | def python_version_tuple(): |
| 1130 |