Python SimpleHTTPServer is really handy
Ever had a situation where you want to send a file to a friend at work
or something, and sending it over email makes you feel all dirty? Â One
way to solve the problem is to copy the file into /var/www/foo
or
something and send a link… we’ve all done it. Â But there’s a better
way :)
Python can be used for web programming, and the language has builtin code for reference implementations of stuff. Â This comes in really handy, for this type of situation. Â Check it:
cd ~/Desktop
python -m SimpleHTTPServer
Then fire up your favorite web browser to: http://localhost:8000 (put
your hostname in there). Â When your buddy has looked at your super slick
file… ctrl+c
the thingy, and you’re done. Â Pretty slick.