[Python-ideas] Better comand line version of python -c

Chris Angelico rosuav at gmail.com
Fri Jan 9 00:39:35 CET 2015


On Fri, Jan 9, 2015 at 10:14 AM, Russell Stewart
<Russell.S.Stewart at gmail.com> wrote:
> I've long thought that python -c and python -m should have ipython style tab
> completion anyways, so that one could type python -m Sim<tab> and get python
> -m SimpleHTTPServer.

That ought to be possible, but it would be a bash (and other) feature,
rather than a Python one. Recent versions of git come with a fairly
comprehensive tab-completion setup, written for multiple shells, and
it should be possible to do something a lot simpler for Python. Of
course, the key here is knowing every possible completion for "python
-m <blah>", without taking three parts of forever to build the list...
but that's largely in the hands of individual sysadmins.

It'd definitely be handy.

ChrisA


More information about the Python-ideas mailing list