Micah Elliott wrote: > On Nov 17, Duncan Booth wrote: > >>Steven D'Aprano wrote: >> >>>What should I do when I can't rely on functions that >>>don't exist in older versions of Python? > > >> sys.exit('Archaic Python not supported, please upgrade') > > > +1 QOTW. > > I recently gave up on trying to support (backport to) pre-2.2 in my > projects. It's been ~3 years since 2.2 released and that seem like a > pretty reasonable support window. I wound up with HACK and > PORTABILITY comments all over the place and too much boilerplate. Now > I go with a startup check on sys.hexversion, and exit with similar > wording. > We could all take an example from Fredrik Lundh, who still regularly releases products that run on everything back to Python 1.5.2. Kudos to the effbot!
regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ -- http://mail.python.org/mailman/listinfo/python-list