[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: MODIFIED: cmdline ...

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-05-17 22:29:39 CEST

Greg Stein <gstein@lyra.org> writes:

> On Tue, May 15, 2001 at 04:25:27PM -0000, sussman@tigris.org wrote:
> >...
> > +###########################################################
> > +#
> > +# Sanity check for anyone importing this module:
> > +# Make sure they're using a recent-enough version of python.
> > +
> > +match = re.search('^(\d+\.\d+)', sys.version)
> > +this_version = string.atof(match.group(1))
> > +if (this_version < python_required_version):
> > + print "Error: this test suite requires python", python_required_version
> > + print " but you have python", this_version
> > + sys.exit(1)
>
> Much simpler:
>
> sys.hexversion
>
> (sys.version_info was intro'd in 2.0 but isn't as easy to use for a check)
>

Doh! I *knew* there had to be something simpler!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:30 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.