[Python-Dev] shebang policy, and pip
tismer at stackless.com
Wed Oct 8 12:16:42 CEST 2014
-----BEGIN PGP SIGNED MESSAGE-----
this question is a bit about general policy which is not yet
covered in the python recommendations:
I see projects which do check-ins like "get rid of shebang lines"
and they remove those lines from non-script sources.
It is not always clear to me what to do, so I tend to leave those
lines in per default, in order not to waste time thinking about it,
but well, today I was confronted with that.
Digging a bit deeper shows the following:
No mention of shebang, but for Windows.
Google's python style guide also says when a shebang is needed, but
does not forbid it.
Pep 394 explains how to use shebang, but still nothing about not using it.
So is there anything officially preferred, and should that go into pep 8?
Special case with pip
I was looking through my installed packages and wondered quite
much about pip:
Pip has a shebang in the __init__ file, but no shebang in the
I guess this is wrong and should be in the executable file,
which is __main__ .
cheers - Chris
Christian Tismer :^) tismer at stackless.com
Software Consulting : http://www.stackless.com/
Karl-Liebknecht-Str. 121 : http://www.pydica.net/
14482 Potsdam : GPG key -> 0xFB7BEE0E
phone +49 173 24 18 776 fax +49 (30) 700143-0023
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - https://gpgtools.org
-----END PGP SIGNATURE-----
More information about the Python-Dev