#!/usr/bin/env python > 2.4?

Jon Ribbens jon+usenet at unequivocal.co.uk
Wed Mar 21 18:42:53 CET 2007


In article <4Rf*J7eGr at news.chiark.greenend.org.uk>, Sion Arrowsmith wrote:
> Jon Ribbens  <jon+usenet at unequivocal.co.uk> wrote:
>>  if sys.hexversion < 0x020400f0:
>>    ... error ...
> 
> "Readability counts."
> 
> if sys.version_info < (2, 4):
>     ... error ...

Maybe you should suggest a patch to the Python documentation then ;-)

The formula I mentioned is the one suggested in the official Python
documentation ( http://docs.python.org/lib/module-sys.html#l2h-5143 )
as being the way to check the Python version.



More information about the Python-list mailing list