Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #8610
| From | Barry Warsaw <barry@debian.org> |
|---|---|
| Newsgroups | linux.debian.maint.python |
| Subject | Re: Python package providing both modules and an app |
| Date | 2016-06-23 03:00 +0200 |
| Message-ID | <rN19U-2q7-13@gated-at.bofh.it> (permalink) |
| References | <rMBfr-2Hb-9@gated-at.bofh.it> <rMF9n-57L-25@gated-at.bofh.it> |
| Organization | The Organization of Unorganized Woozalists |
On Jun 22, 2016, at 11:25 AM, Ben Finney wrote: >This seems to be more common now that command-line invocation is >becoming even more discouraged. When the upstream documentation >recommends ‘python3 -m foo.bar’ as the primary means of invoking the >command line functionality, that really blurs the line between >command-line application versus library. Indeed. It's true that -m invocation isn't as pretty as a /usr/bin script, but it does have the advantage of unambiguously choosing the Python version you want to run the script with. How important that is depends on the application of course. >There is a compounding tendency to disparage ‘python3 ./foo/bar.py’, >which is subject to weird hacks and incomplete workarounds like ><URL:https://www.python.org/dev/peps/pep-0366/>. I wish this trend could >be effectively reversed, because IMO this is a serious impediment to >considering Python a good choice for command-line scripting. But this is >all a digression, my apologies. Sorry, I don't quite understand the above. Do you mean that you would rather use `python3 ./foo/bar.py` more often and `python3 -m foo.bar` less often? In any case, thanks Hugo for choosing Python 3 as the version to use for the /usr/bin script. :) Cheers, -Barry
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python package providing both modules and an app Hugo Lefeuvre <hle@debian.org> - 2016-06-21 23:20 +0200
Re: Python package providing both modules and an app Ben Finney <ben+debian@benfinney.id.au> - 2016-06-22 03:30 +0200
Re: Python package providing both modules and an app Hugo Lefeuvre <hle@debian.org> - 2016-06-22 22:00 +0200
Re: Python package providing both modules and an app Ben Finney <ben+debian@benfinney.id.au> - 2016-06-23 03:10 +0200
Re: Python package providing both modules and an app Hugo Lefeuvre <hle@debian.org> - 2016-06-23 18:40 +0200
Re: Python package providing both modules and an app Hugo Lefeuvre <hle@debian.org> - 2016-06-30 08:30 +0200
Re: Python package providing both modules and an app Thomas Goirand <zigo@debian.org> - 2016-07-05 10:50 +0200
Re: Python package providing both modules and an app Barry Warsaw <barry@debian.org> - 2016-06-23 03:00 +0200
Python program as a command-line program (was: Python package providing both modules and an app) Ben Finney <ben+debian@benfinney.id.au> - 2016-06-23 03:20 +0200
Re: Python program as a command-line program (was: Python package providing both modules and an app) Barry Warsaw <barry@debian.org> - 2016-06-24 21:30 +0200
Re: Python program as a command-line program Ben Finney <ben+debian@benfinney.id.au> - 2016-06-27 09:00 +0200
Re: Python package providing both modules and an app Ian Cordasco <graffatcolmingov@gmail.com> - 2016-06-23 03:30 +0200
Re: Python package providing both modules and an app Thomas Goirand <zigo@debian.org> - 2016-07-05 10:40 +0200
Re: Python package providing both modules and an app Hugo Lefeuvre <hle@debian.org> - 2016-07-05 16:50 +0200
Re: Python package providing both modules and an app Thomas Goirand <zigo@debian.org> - 2016-07-05 21:00 +0200
csiph-web