[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Tools/scripts pydoc,NONE,1.1

Greg Ward gward@python.net
Fri, 2 Mar 2001 11:47:39 -0500


On 02 March 2001, Thomas Heller said:
> Gred Ward, who suddenly reappears:

"He's not dead, he's just resting!"

> What about this code in build_scripts.py?
> 
>   # check if Python is called on the first line with this expression.
>   # This expression will leave lines using /usr/bin/env alone; presumably
>   # the script author knew what they were doing...)
>   first_line_re = re.compile(r'^#!(?!\s*/usr/bin/env\b).*python(\s+.*)?')

Hmm, that's a recent change:

  revision 1.7
  date: 2001/02/28 20:59:33;  author: akuchling;  state: Exp;  lines: +5 -3
  Leave #! lines featuring /usr/bin/env alone

> Doesn't this mean that
> #!/usr/bin/env python
> lines are NOT fixed?

Yup.  Andrew, care to explain why not munging "#!/usr/bin/env python"
lines is the right thing to do?  I happen to think it's not; I think #!
lines should always be munged (assuming this is a Python script, of
course).

        Greg
-- 
Greg Ward - nerd                                        gward@python.net
http://starship.python.net/~gward/
Disclaimer: All rights reserved. Void where prohibited. Limit 1 per customer.