21.10.2009
www_here
Add this to your ~/.profile to start a tiny web server serving the current directory:
function www_here {
python -c 'import SimpleHTTPServer,SocketServer;PORT=1234;httpd = SocketServer.TCPServer(("", PORT),SimpleHTTPServer.SimpleHTTPRequestHandler); print "serving at port", PORT; httpd.serve_forever()'
}
(thanks to Anatol from hypnocode)


$ python -m SimpleHTTPServer
:)