Python-Version überprüfen
Code: Alles auswählen
if sys.version_info[:2] < (2, 5):
HTH
Christian
Zuletzt geändert von CM am Freitag 26. Februar 2010, 21:21, insgesamt 1-mal geändert.
das ist im sys-modul enthalten
Code: Alles auswählen
>>> import sys
>>> sys.version
'2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]'
>>> sys.version_info
(2, 6, 2, 'final', 0)
the more they change the more they stay the same