Creating .exe file in Python

Laura Creighton lac at openend.se
Tue Jun 16 11:04:57 EDT 2015


In a message of Tue, 16 Jun 2015 06:56:12 -0700, subhabrata.banerji at gmail.com w
rites:
>ii) In a class how may I include if __name__ == "__main__": with multiple methods? But I think this is easy question there should be lot of web help. 
>
>If anyone may kindly suggest.
>
>Regards,
>Subhabrata Banerjee. 

There is something wrong in the way you are thinking about this.
You don't _want_ to stick if __name__ = "__main__":
into every class you write.

See if reading this helps.
http://effbot.org/pyfaq/tutor-what-is-if-name-main-for.htm

Laura




More information about the Python-list mailing list