Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #30738

Re: Why is pylaucher in Python 3.3 being installed in Windows folder?

References (1 earlier) <506ceea1$0$29978$c3e8da3$5496439d@news.astraweb.com> <CALwzidn22x+n+XeD+Y3o-0RetukhML8R9sV6peDWnkT=rqOEAw@mail.gmail.com> <mailman.1784.1349325016.27098.python-list@python.org> <61a80e13-ddeb-4d7e-9da3-1e7377f65a67@h16g2000vby.googlegroups.com> <CALwzid=7TQYDC7+QC4rbWkXSbS_KvUzOqLDO9F+SdC5QEkG-Bw@mail.gmail.com>
Date 2012-10-04 17:40 +0100
Subject Re: Why is pylaucher in Python 3.3 being installed in Windows folder?
From Oscar Benjamin <oscar.j.benjamin@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1803.1349368820.27098.python-list@python.org> (permalink)

Show all headers | View raw


On 4 October 2012 16:51, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> On Thu, Oct 4, 2012 at 8:41 AM, Piotr Dobrogost
> <pd@google-groups-2012.dobrogost.net> wrote:
>> Now, the question is why not put pylauncher together with python.exe
>> now, when 3.3 has an option to add Python's folder to the PATH? In
>> case there are more than one Python installed this would mean changing
>> pylauncher when changing active Python (via PATH modification). Maybe
>> that's undesired? If so then installing to Program Files and adding
>> its folder to PATH the same way Python's folder is added would be much
>> better than installing into Windows folder.
>
> It shouldn't go in the Python folder.  There can be more than one
> active Python installation, but there should really be only one active
> pylauncher installation.  They should also be kept separate for
> uninstallation.  So the launcher should have its own separate Program
> Files folder.
>
> I don't see why it's so important that the location be on the path in
> the first place, though.  As I understand it this tool is primarily
> intended to support the .py and .pyw file associations, and those are
> best looked up in the registry, not on the path.  The only reason I
> can see for having it on the path is for when you want to explicitly
> invoke it on the command line, and for that we can either add the
> Program Files location to the path or just let the user deal with
> setting the path, as many Windows programs do.

Having them on PATH means that you can do:

    > py script.py

and the effect will be analogous to (in a unix shell):

    $ ./script.py

Of course the idea with the launcher is that you just do

    > script.py

The difference - on my machine - between explicitly using invoking py
and allowing the file association to do it is that the latter breaks
when redirecting stdin (this is an old bug in Windows):

Q:\>script.py < foo
Traceback (most recent call last):
  File "Q:\script.py", line 5, in <module>
    for line in sys.stdin:
IOError: [Errno 9] Bad file descriptor

Q:\>py script.py < foo
LOTS OF STUFF


It would be good to be able to choose where to put the launchers.
Unless I missed something that wasn't an option in the installer. It
lets you choose the location of all the other files by choosing where
to put the Python folder. Also it's not as simple as just moving them
to where you want after install since they are associated with the
registry keys for running .py and .pyw files.

As it happens, since I don't have access to the WINDOWS folder on my
work machine, the installer did just put them into the Python33 folder
(which is fine with me).


Oscar

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why is pylaucher in Python 3.3 being installed in Windows folder? Piotr Dobrogost <pd@google-groups-2012.dobrogost.net> - 2012-10-03 14:13 -0700
  Re: Why is pylaucher in Python 3.3 being installed in Windows folder? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-04 02:04 +0000
    Re: Why is pylaucher in Python 3.3 being installed in Windows folder? Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-03 21:21 -0600
    Re: Why is pylaucher in Python 3.3 being installed in Windows folder? Chris Rebert <clp2@rebertia.com> - 2012-10-03 21:30 -0700
      Re: Why is pylaucher in Python 3.3 being installed in Windows folder? Piotr Dobrogost <pd@google-groups-2012.dobrogost.net> - 2012-10-04 07:41 -0700
        Re: Why is pylaucher in Python 3.3 being installed in Windows folder? Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-04 09:51 -0600
        Re: Why is pylaucher in Python 3.3 being installed in Windows folder? Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2012-10-04 17:40 +0100
        Re: Why is pylaucher in Python 3.3 being installed in Windows folder? Mark Hammond <skippy.hammond@gmail.com> - 2012-10-07 13:33 +1100
  Re: Why is pylaucher in Python 3.3 being installed in Windows folder? Piotr Dobrogost <pd@google-groups-2012.dobrogost.net> - 2012-10-04 08:32 -0700

csiph-web