You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2001/05/17 20:29:39 UTC
Re: CVS update: MODIFIED: cmdline ...
Greg Stein <gs...@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