[Ilugc] dict client written in python

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Thu Oct 12 15:46:35 2006

On Wed, Oct 11, 2006 at 06:00:17PM +0200, Binand Sethumadhavan wrote:

On 11/10/06, Girish Venkatachalam <girishvenkatachalam@xxxxxxxxx> wrote:
Please dont nitpick on my python, I am a horrible python programmer.

But this does the job for Windoze folks who want to use dict.

Does Windows ship with Python nowadays? If not, surely it is far
better to do this in .NET or something that Windows natively supports?
A VB macro for Word, perhaps? :)
Actually the anecdote goes like this. 

I wrote this program around a year ago when I was younger and brasher to quote 
Roshan Mathews. ;-)

Roshan,
        I simply love that term. And I wish to thank you a million times for 
it.  :-)

And guess what? I wanted the whole world to know it. As if I had conquered an 
empire or something. I shoot off a mail to my contacts(nearly all of them use 
windoze) giving them instructions on how to download , install and add python 
to their path environ variable.

And asked them to use my program.

If my guess is right, not even one of them tried my advice.

And much longer before I setup a LAN at my workplace to dish out dict meanings 
and had just learnt procmail then. So I remembered the familiar advice of 
stringing together powerful UNIX tools.

So I created a rule for people to send me e-mails with subject "find 
capricious" and then fetchmail would download the e-mail, procmail would 
pattern match against the find keyword, and invoke the dict executable.

In this example of course, it would reply with the meaning of "capricious."

Dict would talk to the dict server I setup in LAN for the meaning, once I get 
back, I simply populate the reply buffer with the meaning and reply.

All this is done by procmail with formail helper.

And I used to be a devil even in those days. I quietly archived away their 
original e-mails in a folder. So I would know who actually sent mails.

And I did it with my canonical mail ID. It was amusing to sometimes find that 
ppl would mistype and I would get that mail in my inbox. But overall it was fun 
and somewhat interesting.

All this used to happen in seconds of course.

And ppl used to think that I had done something big. 

It is very funny how non technical ppl think.

Actually I learnt an important lesson. E-mail is the most user friendly and 
familiar tool for any Tom,Dick and Harry. So if you can provide a service thro' 
e-mail you can convince your grandma to use it. :-)

regards,
Girish
PS:- Interestingly OpenBSD does not ship with a dict client. It has something 
called edict which is lesser in power. So I added my dict exe to path yday. So 
I actually ended up adding a dict client to OpenBSD thanx to u folks. :-)

Other related posts: