cheat/cheatsheets/python
Erethon 7afb33aee4 Update and some new examples
* Update a mistake in ifconfig
* Add example for a SOCKS proxy in ssh
* Add an example for mounting a NFS dir in mount
* Add a description for git blame
* Add some examples in grep
* Add example for specifing an interface in dhclient
* Add a description for apt-get install
* Add some commands in apt-cache
* Add an example of pretty printing jsons using python
2013-12-03 22:32:26 +02:00

17 lines
442 B
Plaintext

# Desc: Python is a high-level programming language.
# Basic example of server with python
# Will start a Web Server in the current directory on port 8000
# go to http://127.0.0.1:8000
# Python v2.7
python -m SimpleHTTPServer
# Python 3
python -m http.server 8000
# SMTP-Server for debugging, messages will be discarded, and printed on stdout.
python -m smtpd -n -c DebuggingServer localhost:1025
# Pretty print a json
python -mjson.tool