[Distutils] Odd thought

Rene Liebscher R.Liebscher@gmx.de
Fri Feb 23 03:57:01 2001


"Paul F. Dubois" wrote:
> 
> Right now if you get a package on a Windows machine you can't double-click
> setup.py and have anything good happen. But, if setup.py were setup.ipy you
> could bind a python "%1" install command to the suffix .ipy so this would
> indeed work. The only thing required to make this happen for free is a
> change to the Windows installers to recognize the extension. It wouldn't
> have any particular bad effect on Unix. You either do ./setup.ipy or python
> setup.ipy install, both work.
> 
> Or am I being weird? Mnemonic: I py with my little eye, a Python extension
> to install.
> 
Why not change the "py" binding to "python %1"?

If anyone writes a console program then it is probably
intended to be run with arguments. (If it is started from the console
window as "python foo.py" the "python %1" binding doesn't hurt.)

(And for non-console programs one would call this file "foo.pyw".)

The only problem which remains is that the extension "pyw" is
only used on Windows. But if we could tag such non-console programs
in distutil's setup.py then distutil's install could rename them 
from "py" to "pyw" when it runs on Windows. (Or from "pyw" to 
"py" for all non-Windows platforms, then the extension would be the
tag.)

Kind regards
Rene Liebscher