[Tutor] Checking for Python version
Wayne
srilyk at gmail.com
Tue Oct 6 16:47:43 CEST 2009
On Tue, Oct 6, 2009 at 9:46 AM, Steve Willoughby <steve at alchemy.com> wrote:
> On Tue, Oct 06, 2009 at 09:42:04AM -0500, Wayne wrote:
> > On Tue, Oct 6, 2009 at 9:26 AM, Christian Witts <cwitts at compuscan.co.za
> >wrote:
> > if sys.version < '2.4':
> > sys.exit("Need at least Python 2.4")
> >
> > AFAIK the string comparison is reliable
>
> Not quite. What happens when you compare '2.4' and '2.10'?
>
>>> '2.4' > '2.10'
True
>
>
> --
> Steve Willoughby | Using billion-dollar satellites
> steve at alchemy.com | to hunt for Tupperware.
>
--
To be considered stupid and to be told so is more painful than being called
gluttonous, mendacious, violent, lascivious, lazy, cowardly: every weakness,
every vice, has found its defenders, its rhetoric, its ennoblement and
exaltation, but stupidity hasn’t. - Primo Levi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091006/9b52c09c/attachment.htm>
More information about the Tutor
mailing list