[pydotorg-www] Wiki page documenting running standard modules as scripts

John Whitlock John-Whitlock at ieee.org
Wed Jan 13 11:15:22 EST 2016

I've found that experienced Python developers are unaware that some
standard modules can be run as scripts, such as

$ python -m json.tool path/to/data.json  # Validate and pretty print JSON
$ python -m SimpleHTTPServer [7777]      # Start a web server in the
current folder, default port 8000
$ python -m pdb script.py                # Run script in debugger

I find these useful every few months, but they are also hard to discover.
To find all of them requires reading the Standard Library docs
sequentially.  Searching for -m only finds the documentation for python -m,
and many search engines use "-m" as "omit pages with the word m".

I first tried asking on Stack Overflow, and was told it is out of scope


I think a page listing the standard modules that can run as scripts would
be useful, and wiki.python.org would be a good home for it, so that it
could be kept up-to-date by the community.  I could start this page, if
given editor permissions for it (https://wiki.python.org/ExecutableModules
?). My new account is JohnWhitlock.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pydotorg-www/attachments/20160113/bc20ee0b/attachment.html>

More information about the pydotorg-www mailing list