In a message of Tue, 16 Jun 2015 06:56:12 -0700, subhabrata.bane...@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

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to