Re: Python Script Hashplings

2013-07-26 Thread Devyn Collier Johnson
On 07/25/2013 09:54 AM, MRAB wrote: On 25/07/2013 14:42, Devyn Collier Johnson wrote: If I execute a Python3 script with this haspling (#!/usr/bin/python3.3) and Python3.3 is not installed, but Python3.2 is installed, would the script still work? Would it fall back to Python3.2? Why don't

Re: Python Script Hashplings

2013-07-26 Thread Devyn Collier Johnson
On 07/25/2013 10:01 AM, Matthew Lefavor wrote: The answer is probably not. If you just want to use the latest version of Python 3 you have installed on your system, use: #!/usr/bin/python3. When you use the specific minor version numbers, they point to that specific minor version. Actually,

Re: Python Script Hashplings

2013-07-26 Thread Chris Angelico
On Fri, Jul 26, 2013 at 11:37 AM, Devyn Collier Johnson devyncjohn...@gmail.com wrote: On 07/25/2013 09:54 AM, MRAB wrote: On 25/07/2013 14:42, Devyn Collier Johnson wrote: If I execute a Python3 script with this haspling (#!/usr/bin/python3.3) and Python3.3 is not installed, but Python3.2

Re: Python Script Hashplings

2013-07-26 Thread Tim Golden
On 26/07/2013 11:37, Devyn Collier Johnson wrote: On 07/25/2013 09:54 AM, MRAB wrote: On 25/07/2013 14:42, Devyn Collier Johnson wrote: If I execute a Python3 script with this haspling (#!/usr/bin/python3.3) and Python3.3 is not installed, but Python3.2 is installed, would the script still

Re: Python Script Hashplings

2013-07-26 Thread MRAB
On 26/07/2013 11:43, Chris Angelico wrote: On Fri, Jul 26, 2013 at 11:37 AM, Devyn Collier Johnson devyncjohn...@gmail.com wrote: On 07/25/2013 09:54 AM, MRAB wrote: On 25/07/2013 14:42, Devyn Collier Johnson wrote: If I execute a Python3 script with this haspling (#!/usr/bin/python3.3)

Re: Python Script Hashplings

2013-07-26 Thread Chris Angelico
On Fri, Jul 26, 2013 at 2:53 PM, MRAB pyt...@mrabarnett.plus.com wrote: If you want to test what would happen if that version wasn't installed, set the shebang line to a future version, such as Python 3.4. I doubt you have that installed! :-) Be careful, some people DO have a python3.4 binary

Re: Python Script Hashplings

2013-07-26 Thread Matthew Lefavor
Thanks Matthew Lefavor! But specifically, why use #!/usr/bin/env python3 instead of #!/usr/bin/python3? The env program looks up its argument in the current $PATH environment variable, and then executes that. This means you aren't necessarily tied to /usr/bin/python3. It makes things more

RE: Python Script Hashplings

2013-07-26 Thread Prasad, Ramit
Devyn Collier Johnson wrote: Thanks Matthew Lefavor! But specifically, why use #!/usr/bin/env python3 instead of #!/usr/bin/python3? Mahalo, DCJ I believe this will work on Windows for Python 3.3+ and also with virtualenv. https://pypi.python.org/pypi/virtualenv Virtualenv is highly

Re: Python Script Hashplings

2013-07-26 Thread Ben Finney
Tim Golden m...@timgolden.me.uk writes: Devyn, I'm not a *nix person so someone can point out if I'm wrong, but my understanding is that the shebang line (or whatever you want to call it) just tells the shell: run this command to run this file. So you can put #!/usr/bin/fish-and-chips as the

Re: Python Script Hashplings

2013-07-26 Thread Devyn Collier Johnson
On 07/26/2013 10:14 AM, Chris Angelico wrote: On Fri, Jul 26, 2013 at 2:53 PM, MRAB pyt...@mrabarnett.plus.com wrote: If you want to test what would happen if that version wasn't installed, set the shebang line to a future version, such as Python 3.4. I doubt you have that installed! :-) Be

Python Script Hashplings

2013-07-25 Thread Devyn Collier Johnson
If I execute a Python3 script with this haspling (#!/usr/bin/python3.3) and Python3.3 is not installed, but Python3.2 is installed, would the script still work? Would it fall back to Python3.2? I hope Dihedral is listening. I would like to see another response from HIM. Mahalo, DCJ --

Re: Python Script Hashplings

2013-07-25 Thread MRAB
On 25/07/2013 14:42, Devyn Collier Johnson wrote: If I execute a Python3 script with this haspling (#!/usr/bin/python3.3) and Python3.3 is not installed, but Python3.2 is installed, would the script still work? Would it fall back to Python3.2? Why don't you try it? I hope Dihedral is

Re: Python Script Hashplings

2013-07-25 Thread Matthew Lefavor
The answer is probably not. If you just want to use the latest version of Python 3 you have installed on your system, use: #!/usr/bin/python3. When you use the specific minor version numbers, they point to that specific minor version. Actually, the preferred shebang line is of the form: