Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; '"__main__":': 0.07; '__name__': 0.07; 'subject:file': 0.07; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'cc:addr:python-list': 0.10; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'helps.': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:89.233': 0.16; 'received:89.233.217': 0.16; 'received:89.233.217.133': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'write.': 0.16; 'laura': 0.18; 'cc:addr:python.org': 0.21; 'cc:2**1': 0.22; 'stick': 0.22; 'subject: .': 0.22; 'help.': 0.23; '2015': 0.23; 'header:In-Reply- To:1': 0.24; 'question': 0.26; 'this.': 0.28; '-0700,': 0.29; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'anyone': 0.32; 'class': 0.33; 'wrong': 0.35; 'something': 0.35; 'but': 0.36; 'url:org': 0.36; 'there': 0.36; 'should': 0.37; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'tue,': 0.38; 'easy': 0.60; 'header:Message-Id:1': 0.62; 'kindly': 0.64; 'email addr:gmail.com': 0.64; 'url:htm': 0.73; 'received:89': 0.80; '>if': 0.84 To: subhabrata.banerji@gmail.com cc: python-list@python.org, lac@openend.se From: Laura Creighton Subject: Re: Creating .exe file in Python In-Reply-To: Message from subhabrata.banerji@gmail.com of "Tue, 16 Jun 2015 06:56:12 -0700." <5f6b802f-049b-48e3-b1fd-a5915b7f3dbb@googlegroups.com> References: <349bb66f-bd3c-47ec-bd1d-35f46d23cf95@googlegroups.com><2219d0b2-24a4-498b-b981-456faf0ceb44@googlegroups.com> <5f6b802f-049b-48e3-b1fd-a5915b7f3dbb@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21704.1434467097.1@fido> Content-Transfer-Encoding: quoted-printable Date: Tue, 16 Jun 2015 17:04:57 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Tue, 16 Jun 2015 17:05:02 +0200 (CEST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1434467117 news.xs4all.nl 2933 [2001:888:2000:d::a6]:45897 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!usenet.pasdenom.info!news.stben.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed4b.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Xref: csiph.com comp.lang.python:92681 In a message of Tue, 16 Jun 2015 06:56:12 -0700, subhabrata.banerji@gmail.= com w rites: >ii) In a class how may I include if __name__ =3D=3D "__main__": with mult= iple 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__ =3D "__main__": into every class you write. See if reading this helps. http://effbot.org/pyfaq/tutor-what-is-if-name-main-for.htm Laura