Shebang line on Windows?
zachary.ware+pylist at gmail.com
Fri Feb 22 19:40:53 CET 2013
On Fri, Feb 22, 2013 at 12:16 PM, Walter Hurry <walterhurry at lavabit.com> wrote:
> I use FreeBSD or Linux, but my son is learning Python and is using
> My question is this: Would it be good practice for him to put #!/usr/bin/
> env python at the top of his scripts, so that if made executable on *nix
> they will be OK? As I understand it this will have no effect on Windows
Adding the shebang line on Windows would be excellent practice. In
fact, Python 3.3 and later ships with the Python Launcher for Windows
 which is very effective at reading the shebang line and executing
the script with the proper Python installation. It makes using Python
2.x and 3.x on the same Windows machine much less painful, as well as
not having to add anything to the PATH and being able to launch
whichever interpreter you want with a single command.
More information about the Python-list