Monday, June 11, 2012

Stand and deliver ...

... er, I meant search and open (*).

Seen on Mike Driscoll's blog via Twitter:

(*) As in, search the web for a phrase and open the result(s) - which is what Mike's post shows how to do, using a few Python libraries - urllibr/urllib2, requests, mechanize and webbrowser. I particularly like the use of webbrowser to automate the opening of the results. The webbrowser module has some options to customize its behavior - see the Python docs for it.

Speaking of webbrowser, spynner looks interesting too.

And the "stand and deliver" bit refers to stories about highwaymen in England of past centuries: - from memories of historical novels I read as a kid :)

Inspired by nature.
- | @vasudevram |

No comments: