Aaron Hall added the comment:
I like this idea too, but perhaps it should just be a multi-column bulleted
list (under the -m flag at
https://docs.python.org/3/using/cmdline.html#interface-options) with links to
the respective Standard Library doc?
Then we just ensure the documentation for the
Steve Barnes added the comment:
Having done some checks for the practicality of auto documenting library items
with a -m command line usage I have to say that it will not be so simple.
Many of the library items that provide useful functionality, including zipfile
& tarfile, are implemented as
Eric Lafontaine added the comment:
Hi,
I've just watched the old David Beazley video about the packaging system in
python and got me thinking about this issue.
I'm throwing the idea, please critize it!
If we were to make a "hook" for the .rst files of the modules to go and scan
the __main__.
Miki Tebeka added the comment:
Thanks Guido, however I think my blog is not the right place - it's dog ugly
and read by about 7 people on a good day :)
I think that adding this to the official docs will add to the "batteries
included" motto. I'll try to find a time and come up with a patch to
Guido van Rossum added the comment:
I'm neutral on this idea. I would much rather focus on making sure that the
various modules (such as pdb or tarfile) which have useful command-line
functionality document that clearly and uniformly, but as part of each module's
library docs.
I don't think
Miki Tebeka added the comment:
Eric - sorry I wasn't clear. I'm not talking about the -m behavior in general
but on the modules in the standard library that can be used with it. A lot of
windows are happy to know about "python -m tarfile" to they can extract tar
files without installing an ext
Raymond Hettinger added the comment:
+1 for Miki's idea. It would be nice if there were a single page that
collected together all the command-line tools (with examples). It should
include a 2to3 example as well. Also, there should be some indication of which
tools we guarantee to be availab
Eric Lafontaine added the comment:
Hi,
I believe it's already done. The only thing that people tends to forget is
that doing python -m "module.script(.py)" is only doing the equivalent of
"python module/script.py".
I believe it's clear though ;
https://docs.python.org/3/using/cmdline.html#c
New submission from Miki Tebeka:
Several modules can be invoked with -m and are pretty handy (json.tool,
zipfile, tarfile ...).
There should be a section in the documentation that groups all of these "python
-m" tools together. Something like
http://pythonwise.blogspot.nl/2015/01/python-m.htm