[Tutor] What is `if __name__ == "__main__"` for?
Walter Prins
wprins at gmail.com
Fri May 20 13:26:39 CEST 2011
On 20 May 2011 12:09, Ganesh Kumar <bugcy013 at gmail.com> wrote:
> Hi Gurus,
>
> I am new python programming.. I see many programs
> if __name__ == '__main__':
> when I check __name__ always eq __main__.
> what purpose use these structure.. please guide me..
>
> -Ganesh
Here you go:
http://lmgtfy.com/?q=What+is+the+purpose+of+if+__name__+%3D+%27__main__%27
;)
Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110520/ddae51f1/attachment.html>
More information about the Tutor
mailing list