[Python-porting] Shebang lines for Python 3

Lennart Regebro regebro at gmail.com
Mon Sep 5 07:57:44 CEST 2011


On Mon, Sep 5, 2011 at 07:41, David Gowers (kampu) <00ai99 at gmail.com> wrote:

>
>
> On Mon, Sep 5, 2011 at 3:02 PM, Lennart Regebro <regebro at gmail.com> wrote:
>
>> On Sun, Sep 4, 2011 at 21:07, Aaron Meurer <asmeurer at gmail.com> wrote:
>>
>>> Hi.
>>>
>>> We've been having a bit of a discussion about this on the SymPy
>>> (sympy.org) issue tracker.  Is it proper to use "python3" in the
>>> shebang line of a script that should be run in Python 3?  Something
>>> like
>>>
>>> #! /usr/bin/env python3
>>>
>>
>> It is proper, sure.
>>
>> This shortcut works on my machine, but I don't know if it's universal
>>> to all Python 3 installs.
>>
>>
>> I know archlinux uses just "python" for Python 3 and "python2" for Python
>> 2.
>>
> Not that that stops you from using 'python3' or even 'python3.2' (though I
> wouldn't recommend the latter.). So no changes should be necessary.
>

Right,  "python3.2 " would be the best way here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-porting/attachments/20110905/d234c692/attachment.html>


More information about the Python-porting mailing list