|
From: Aahz <aa...@py...> - 2002-11-14 03:53:48
|
On Wed, Nov 13, 2002, David Goodger wrote: > Aahz wrote: >> On Tue, Nov 12, 2002, David Goodger wrote: >>> >>> General tip: at the top of script files, don't use:: >>> >>> #!/usr/bin/python >>> >>> Please use this instead:: >>> >>> #! /usr/bin/env python >> >> Enh. Too many sysadmins I know decry this practice as a security risk. > > Do you know of any good references? Genuinely curious. No handy references, but IIRC, the primary worry is that someone could install a nasty shell script into your path named "python". Also, with the regular version increases in Python, I've seen more people recommend using a specific version number. As for myself, I usually call my scripts as "python script.py", which is guaranteed to work in Windoze. >> It's not in PEP 8. > > PEP 8 doesn't mention hash-bangs or script execution at all; I don't > get the point. The point was that you seemed to be pushing it as a "standard", and I was reminding you that it's not. -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ A: No. Q: Is top-posting okay? |