Re: check interpreter version before running script

2005-04-06 Thread rbt
Peter Otten wrote: rbt wrote: Is there a recommended or 'Best Practices' way of checking the version of python before running scripts? I have scripts that use the os.walk() feature (introduced in 2.3) and users running 2.2 who get errors. Instead of telling them, 'Upgrade you Python Install, I'd l

Re: check interpreter version before running script

2005-04-05 Thread Fredrik Lundh
"rbt" <[EMAIL PROTECTED]> wrote: > Is there a recommended or 'Best Practices' way of checking the version of > python before running > scripts? I have scripts that use the os.walk() feature (introduced in 2.3) > and users running 2.2 > who get errors. Instead of telling them, 'Upgrade you Pyth

Re: check interpreter version before running script

2005-04-05 Thread djo
Josef Meile wrote: What's about: >>> import sys >>> print sys.version_info (2, 1, 3, 'final', 0) Python 1.5.2 (#1, Mar 3 2001, 01:35:43) [GCC 2.96 2731 (Red Hat Linux 7.1 2 on linux-i386 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import sys >>> sys.version_info Trace

Re: check interpreter version before running script

2005-04-05 Thread Josef Meile
Is there a recommended or 'Best Practices' way of checking the version of python before running scripts? I have scripts that use the os.walk() feature (introduced in 2.3) and users running 2.2 who get errors. Instead of telling them, 'Upgrade you Python Install, I'd like to use sys.version or s

Re: check interpreter version before running script

2005-04-05 Thread Martin Franklin
F. Petitjean wrote: Le Tue, 05 Apr 2005 08:57:12 -0400, rbt a écrit : Is there a recommended or 'Best Practices' way of checking the version of python before running scripts? I have scripts that use the os.walk() feature (introduced in 2.3) and users running 2.2 who get errors. Instead of tellin

Re: check interpreter version before running script

2005-04-05 Thread Peter Hansen
rbt wrote: Is there a recommended or 'Best Practices' way of checking the version of python before running scripts? I have scripts that use the os.walk() feature (introduced in 2.3) and users running 2.2 who get errors. Instead of telling them, 'Upgrade you Python Install, I'd like to use sys.v

Re: check interpreter version before running script

2005-04-05 Thread F. Petitjean
Le Tue, 05 Apr 2005 08:57:12 -0400, rbt a écrit : > Is there a recommended or 'Best Practices' way of checking the version > of python before running scripts? I have scripts that use the os.walk() > feature (introduced in 2.3) and users running 2.2 who get errors. > Instead of telling them, 'Upg

Re: check interpreter version before running script

2005-04-05 Thread Peter Otten
rbt wrote: > Is there a recommended or 'Best Practices' way of checking the version > of python before running scripts? I have scripts that use the os.walk() > feature (introduced in 2.3) and users running 2.2 who get errors. > Instead of telling them, 'Upgrade you Python Install, I'd like to use