In <mailman.261.1257963528.2873.python-l...@python.org> Benjamin Kaplan <benjamin.kap...@case.edu> writes:
>On Wed, Nov 11, 2009 at 12:16 PM, kj <no.em...@please.post> wrote: >> >> >> >> >> I have a script that must be run with Python 2.6.x. =A0If one tries >> to run it with, say, 2.5.x, *eventually* it runs into problems and >> crashes. =A0(The failure is quicker if one attempts to run it with >> Python 3.x.) >> >> Is there some way to specify at the very beginning of the script >> the acceptable range of Python versions? >> >min_version =3D (2,6) >import sys >if sys.version_info < min_version : > print >> stderr, "must be run with at least Python 2.6" > sys.exit(1) Thanks! kynn -- http://mail.python.org/mailman/listinfo/python-list