Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charlesponti/ba153a7319ef27403c81ad03edcd9807 to your computer and use it in GitHub Desktop.
Save charlesponti/ba153a7319ef27403c81ad03edcd9807 to your computer and use it in GitHub Desktop.
3 Python modules you can use directly on the CLI
# Start a local webserver to serve the file of your current directory on the LAN:
# Python version 2.x:
python -m SimpleHTTPServer
# Python version 3.x:
python3 -m http.server
#Start a local SMTP server to debug your app emails. Emails will be printed on stdout:
python -m smtpd -c DebuggingServer -n
#Parse and prettify a JSON string with:
cat mydata.json | python -m json.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment