[Python-Dev] Thoughts on running Python 3.5 on Windows (path, pip install --user, etc)

Nick Coghlan ncoghlan at gmail.com
Tue Mar 10 00:11:53 CET 2015


On 10 Mar 2015 02:37, "Donald Stufft" <donald at stufft.io> wrote:
> >
> > I'm okay with this. Installing for all users is really something that
could be considered an advanced option rather than the default, especially
since the aim (AIUI) of the all-users install is to pretend that Python was
shipped with the OS. (I'd kind of like to take that further by splitting
things more sensibly between Program Files, Common Files and System32, but
there's very little gain from that and much MUCH pain as long as people are
still expecting C:\PythonXY installs…)
>
> Maybe the answer is to write up a PEP and standardize the idea of entry
points, specifically the console_scripts and ui_scripts (or whatever it’s
called) entrypoints and then give Python something like -m, but which
executes a specific entry point name instead of a module name (or maybe -m
can fall back to looking at entry points? I don’t know).

While I like the idea of offering something more "built in" in this space,
my initial inclination is to prefer extending "-m" to accept the
"module.name:function.name" format to let you invoke entry points by the
name of the target function (Possible API name: runpy.run_cli_function),
and then add a "runpy.call" that can be used to call an arbitrary function
with positional and keyword string arguments based on sys.argv and
(optionally?) print the repr of the result.

It wouldn't be a universal panacea (and would need a PEP to work out the
exact UX details), but would likely make quite a few libraries more command
line accessible without needing to modify them.

Cheers,
Nick.

>
> I’ve given this like… 30s worth of thought, but maybe:
>
>     pip install pygmentize  # Implicit —user
>     py -e pygmetize
>
> Is an OK UX for people to have without needing to add the user site bin
directory to their PATH. Maybe it’s a horrible idea and we should all
forget I mentioned it :)
>
> ---
> Donald Stufft
> PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150310/5b80fd4e/attachment.html>


More information about the Python-Dev mailing list