> On Mar 9, 2015, at 7:11 PM, Nick Coghlan <ncogh...@gmail.com> wrote: > > > On 10 Mar 2015 02:37, "Donald Stufft" <don...@stufft.io > <mailto:don...@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 <http://unction.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. > >
If I understand this correctly, you’re suggesting that to run ``pygmentize`` without using the script wrapper, you’d need to do ``py -m pygments.cmdline:main`` instead of ``pygmentize``? I don’t think that actually solves the problem (except by making it so that the script wrappers can maybe just be exactly #!/usr/bin/python -m pygments.cmdline:main but that’s a different thing..). I’m not against it in general though, I just don’t know that it solves the problem Paul was mentioning. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com