lunatechian (lunatech-ian)

one relating to, belonging to, or resembling lunatech

Search Google from command line

As I had pointer out in my previous entry, I had not been able to search google from within my emacs environment. Hence the "need" to write a command line script which I would be able to call from within emacs

The code is not the best I have written and any decent Python programmer would be able to make more improvements to it. If you do something clever with the code, it would be very kind of you to let me know about it too (raj at rajshekhar.net).

You need to have Pygoogle module installed. In its unaltered form, the script will require Python2.3 to run. However, if you remove the #--ugly hack part (see the comments in the code), it will run with Python2.2 too.

Code now available at mouse click from here.

Defined tags for this entry: ,

to GET or to POST

As Macbeth would have said "To GET or to POST , that is the question". The general consensus is :

  • Use GET when you want to give the user the ability to bookmark a page (as all the data is held in the URL and does not rely on an existing session on the server.) The "get" method should be used when the form is idempotent (i.e., causes no side-effects).
  • Use POST when a form causes side effects (for example, if the form modifies a database or subscription to a service).

formed discussion over this topic in this usenet thread. Some words from the bible covering this topic. A more lengthy but not boring discussion on this topic is URIs, Addressability, and the use of HTTP GET and POST
Defined tags for this entry: ,