[Distutils] small improvement of the script functionality under win32

M.-A. Lemburg mal at egenix.com
Wed Mar 30 09:51:32 CEST 2005

Vivian De Smedt wrote:
> Distutils have a script functionality that copy the corresponding file
> into a common script folder (that could be on the path) and sligthly
> modify the first line of the script to reflect the path of the python
> executable.
> It is very nice but for the window platform I think it could be improved.
> First the extention of the script could be .cmd such that they will be
> accessible as commands as soon as the script folder is in the path.
> Second the first line adaptation could be slightly different and take
> advantage of the -x option of the python executable
> #!python foo bar
> could become:
> @C:\Python24\python.exe -x "%~f0" foo bar  & exit /b
> instead of:
> #!C:\Python24\python.exe -x "%~f0"  foo bar & exit /b

Sounds like a good idea. The only thing I don't understand is
why you'd want to use ".cmd" instead of the more common ".bat".

> Follows a proposition of modification of the copy_scripts function of
> the build_scripts.py that reflect these changes

Please submit this as patch on SourceForge (http://python.sf.net).

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Mar 30 2005)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the Distutils-SIG mailing list