[Python-3000] [Python-ideas] Namespaces are one honking great idea -- let's do more of those!

Phillip J. Eby pje at telecommunity.com
Tue Feb 5 18:57:58 CET 2008


At 10:43 AM 2/5/2008 -0700, Adam Olsen wrote:
>So why don't we add a windows equivalent of the shebang?  Files could
>then start like this:
>
>#!/usr/bin/python2.3
>#¡C:/python23/python

FYI, setuptools uses and supports #! lines on Windows, with the 
executable path in quotes if it contains spaces.  For a given script 
"foo", it generates two files:

     foo.exe
     foo-script.py

And the .exe is just a standardized .exe file that looks in an 
adjacent -script.py file of the same name for the #! line.

(This is of course only for scripts generated using 
setuptools-specific features.)


>A problem with this approach is that, if you only had 2.3 and 2.5
>installed, both it'd be completely ignored.  You'd need to install a
>newer version (2.6 or 3.0) to force the use of 2.3.

Setuptools works with versions 2.3 through 2.5, but of course that's 
because of the .exe wrappers.



More information about the Python-3000 mailing list