raghu raghu wrote:
> i have a clarification regarding built in function,in some scripts it is 
> being used and it is give n: if _name_ == '_main_'
> why this is being used in the scripts?

This is a way to include test code that runs if the module is run as a 
main program, but not if the module is imported.

Here is some more explanation:
http://diveintopython.org/getting_to_know_python/testing_modules.html
http://pyfaq.infogami.com/tutor-what-is-if-name-main-for

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to