Code help for understand

J. Mwebaze jmwebaze at gmail.com
Wed May 2 08:43:47 EDT 2012


if you are referring to the line
*
*
*if __name__ == '__main__':*
*
*
Find a good explanation here
*
*
http://stackoverflow.com/questions/419163/what-does-if-name-main-do



On Wed, May 2, 2012 at 2:30 PM, viral shah <shahviral.it at gmail.com> wrote:

> Hi
>
> in every .py file I found this same code line on the below side
>
> *def main():
>     application = webapp.WSGIApplication([('/', MainHandler)],
>                                          debug=True)
>     run_wsgi_app(application)
>
>
> if __name__ == '__main__':
>     main()
> *
> can anyone explain me what's the all this thing suggest?
>
>
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>


-- 
*Mob UG: +256 (0) 70 1735800 | NL +31 (0) 6 852 841 38 | Gtalk: jmwebaze |
skype: mwebazej | URL: www.astro.rug.nl/~jmwebaze

/* Life runs on code */*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120502/075c507d/attachment-0001.html>


More information about the Python-list mailing list