[Distutils] Odd thought

Rene Liebscher R.Liebscher@gmx.de
Fri Feb 23 10:21:00 2001


"Paul F. Dubois" wrote:
> 
> Aha. If a setup.py started with this:
> import sys
> if len(sys.argv) == 1:
>     sys.argv.append('install')
> 
> it would work to double-click it. No window needed. (:->
But what if an user tries on the command line "python setup.py"
normally he gets an usage description and doesn't start "install".

May be the changing of the "py" binding to "cmd /k python %1" is the
best solution here. If you double-click on the file, it opens a console
window, runs the file with python, DOESN'T close the window so you can
see the
result and you are already in the right directory to make another try
with arguments. (And it works for all command line python programs, not
only distutils setup.py.)

> 
> This is no more offensive than my ipy idea. For those who don't like this,
> it could print a prompt "Install? (y/n): ", read the answer, etc.
> 
> That said, if distutils' setup command contained this code...
> 

Rene