[Python-Dev] Python 2.3b1, distutils and PEP 263

Gustavo Niemeyer niemeyer@conectiva.com
Fri, 27 Jun 2003 16:44:19 -0300


Hi François!

> For quite a long time, I noticed that Distutils inserts a supplementary
> white line when it transforms the shebang line.  There might be some reason
> for this white line, and I'm curious about it.  This does not interact
> nicely with PEP 263.  For example, the file:
[...]

Just to satisfy your curiosity, it was a bug in the regular expression
matching the first line:

  # check if Python is called on the first line with this expression
  first_line_re = re.compile('^#!.*python[0-9.]*(\s+.*)?$')

The detail here is that \s also matches a newline. Fixed in CVS.

Thanks for reporting!

-- 
Gustavo Niemeyer
http://niemeyer.net