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 there: http://stackoverflow.com/questions/34770555/what-python-standard-library-modules-can-execute-as-scripts-with-m 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. John
_______________________________________________ pydotorg-www mailing list pydotorg-www@python.org https://mail.python.org/mailman/listinfo/pydotorg-www