Re: How to specify Python version in script?

2009-11-14 Thread kj
In 77b812a9-d82c-4aaa-8037-ec30366fc...@h34g2000yqm.googlegroups.com Yinon Ehrlich yinon...@gmail.com writes: Is there some way to specify at the very beginning of the script the acceptable range of Python versions? sys.hexversion, see

Re: How to specify Python version in script?

2009-11-12 Thread Yinon Ehrlich
Is there some way to specify at the very beginning of the script the acceptable range of Python versions? sys.hexversion, see http://mail.python.org/pipermail/python-list/2009-June/185939.html -- Yinon -- http://mail.python.org/mailman/listinfo/python-list

How to specify Python version in script?

2009-11-11 Thread kj
I have a script that must be run with Python 2.6.x. If one tries to run it with, say, 2.5.x, *eventually* it runs into problems and crashes. (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

Re: How to specify Python version in script?

2009-11-11 Thread David Robinow
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.  If one tries to run it with, say, 2.5.x, *eventually* it runs into problems and crashes.  (The failure is quicker if one attempts to run it with Python 3.x.) Is there

Re: How to specify Python version in script?

2009-11-11 Thread Benjamin Kaplan
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.  If one tries to run it with, say, 2.5.x, *eventually* it runs into problems and crashes.  (The failure is quicker if one attempts to run it with Python 3.x.) Is there

Re: How to specify Python version in script?

2009-11-11 Thread Javier Collado
Hello, If you are working on linux, you can change the shebang line from: #!/usr/bin/python to: #!/usr/bin/python2.6 Best regards, Javier P.S. If you just want to avoid python 3 while running the latest python 2.x version, this should also work: #!/usr/bin/python2 2009/11/11 Benjamin

Re: How to specify Python version in script?

2009-11-11 Thread Benjamin Kaplan
On Wed, Nov 11, 2009 at 1:28 PM, Javier Collado javier.coll...@gmail.com wrote: Hello, If you are working on linux, you can change the shebang line from: #!/usr/bin/python to: #!/usr/bin/python2.6 Best regards,    Javier P.S. If you just want to avoid python 3 while running the latest

Re: How to specify Python version in script?

2009-11-11 Thread kj
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