/2011/11/30/python-love-letter/
{"item":{"status":"visible","url":"\/2011\/11\/30\/python-love-letter\/","trash":"","name":"python-love-letter","parent":"","title":"Python never lets you down","date":"2011-11-30 11:54:39","filepath":"posts\/2000842_python-love-letter.xml.json","type":"post","content":"<img class=\"alignleft size-medium wp-image-844\" style=\"margin-right: 0px; margin-bottom: 0px;\" title=\"python-logo\" src=\"http:\/\/www.8bitrobot.com\/media\/uploads\/2011\/11\/python-logo-300x292.png\" alt=\"python-logo\" width=\"76\" height=\"73\" \/>Sometime in the future, you will find yourself wanting to test some quick web code (say <a href=\"http:\/\/en.wikipedia.org\/wiki\/WebGL\" target=\"_blank\">WebGL<\/a>) and hit problems with cross domain scripting since your first try is always to load an html file in your browser from the file system (file:\/\/).\n\nYou will groan at the thought of having to host a web server just to test your web code... And if it's offsite, or in a VM, keeping the files sync'd during debugging can be annoying.\n\n<em>Not to fear, Python to the rescue!<\/em>\n\nJust change to your development directory in your console and use <a href=\"http:\/\/python.org\/\" target=\"_blank\">Python's<\/a> <em><a href=\"http:\/\/docs.python.org\/library\/simplehttpserver.html\" target=\"_blank\">SimpleHTTPServer<\/a><\/em>:\n<blockquote>\n<pre>> python -m SimpleHTTPServer<\/pre>\n<\/blockquote>\nOh! Think of the many headaches and blistering ulcers this will save you from getting.\n\n<strong>XOXO, we love you Python.<\/strong>"}}