Python et l’information version¶
connaitre sa version
#!/usr/bin/env/python
import sys
print(sys.version_info)
Vérifier la version utilisé
#!/usr/bin/env/python
import sys
if sys.version_info<(2,6,0):
sys.stderr.write("You need python 2.6 or later to run this script\n")
exit(1)