[Python-porting] Shebang lines for Python 3

Aaron Meurer asmeurer at gmail.com
Sun Sep 4 21:07:35 CEST 2011


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

This shortcut works on my machine, but I don't know if it's universal
to all Python 3 installs.  This certainly would make it easier to me
developing with those scripts, because I can just call ./script.py,
but I'm wondering if it's proper to use that in the final (Python 3
version of the) release of the package.

Aaron Meurer


More information about the Python-porting mailing list