Skip to content

Instantly share code, notes, and snippets.

@miku
miku / pythononeliners.txt
Created April 13, 2018 16:38
python one liners!
Some useful Python one-liners taken from http://www.reddit.com/r/Python/comments/fofan/suggestion_for_a_python_blogger_figure_out_what/
All modules listed are part of the standard library and should work with Python 2.6+
How to use:
$ python -m [module] [arguments]
calendar - does default to displaying a yearly calendar, but it has a bunch of options (args are year or year month, options are HTML output, calendar locale, encoding, and some type-specific stuff, see python -m calendar -h)
cgi, dumps a bunch of information as HTML to stdout