This aims at listing day-to-day useful one-liners.
Run an HTTP server in the current directory:
# Python 2
python -m SimpleHTTPServer
# Python 3
python -m http.server
Going further:
- Improved scripted version (better case and encoding support)
- Big list of HTTP static server one-liners
Run a SMTP server that dumps messages to the standard output:
python -m smtpd -n -c DebuggingServer localhost:1025