J
John Nagle
This works, but it seems too cute:
Is it guaranteed that the Python version string will be in a form
suitable for that? In other words, does "sys.version" begin
N.N.N other stuff
in all versions, and will it stay that way? Are there ever
non-numeric versions, like "3.2.rc1"?
John Nagle
[2, 6, 1]>>> pyver = map(int,sys.version.split()[0].split('.'))
>>> print(pyver)
Is it guaranteed that the Python version string will be in a form
suitable for that? In other words, does "sys.version" begin
N.N.N other stuff
in all versions, and will it stay that way? Are there ever
non-numeric versions, like "3.2.rc1"?
John Nagle