From: James Edward Gray II Date: 2006-11-06T02:10:07+09:00 Subject: Re: how to know if i am in a module or in the main script ? On Nov 5, 2006, at 8:30 AM, Jeremy McAnally wrote: > I don't know about Ruby, but many times this is used in Python libs to > run example code if it's being run by itself and just be a library if > it's included. Pretty neat way of keeping the file clutter to a > minimum. This is a good point in that this in not Ruby specific. I've seen this idiom in many languages for years now. I like it and often use it to put a basic command-line interface over my libraries. James Edward Gray II