Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #92687
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2015-06-16 09:23 -0700 |
| References | (2 earlier) <mailman.487.1434385760.13271.python-list@python.org> <5f6b802f-049b-48e3-b1fd-a5915b7f3dbb@googlegroups.com> <mailman.515.1434467117.13271.python-list@python.org> <2de8f2c1-5a92-4f8b-be2d-c793de69d463@googlegroups.com> <mailman.518.1434470627.13271.python-list@python.org> |
| Message-ID | <e87670d2-a26e-4da5-8e49-ab3c490e3f1a@googlegroups.com> (permalink) |
| Subject | Re: Creating .exe file in Python |
| From | subhabrata.banerji@gmail.com |
On Tuesday, June 16, 2015 at 9:33:58 PM UTC+5:30, Chris Angelico wrote:
> On Wed, Jun 17, 2015 at 1:17 AM, wrote:
> > Thanks. The scipy issue seems solved. But this silly issue is giving so much of time. I am checking. Please see a sample code,
> >
> > import sys
> > sys.stderr = sys.stdout
> > class Colors:
> > def Blue(self):
> > self.var="This is Blue"
> > print self.var
> > def Red(self):
> > print self.var
> >
> >
> >
> > if __name__ == "__main__":
> > Colors().Blue() #THIS IS FINE
> > Colors().Red() #NOT FINE
>
> You're still not saying what's going on. Did you try this code as a
> simple Python script first, before trying to bundle it up into an .exe
> file?
>
> Fortunately, my primary crystal ball is active, and I believe what's
> going on is that you expect Blue() to set something and then Red() to
> see it. However, you're calling those methods on two different
> throw-away objects, so they have separate state. What you expect to
> happen, I honestly have no idea. (Also, why are you fiddling with
> sys.stderr? You don't then appear to be using it, unless you have an
> issue with exceptions getting printed to the other stream.)
>
> ChrisA
Thank you for your reply. I am trying to experimenting over small ones before going to actual code. Your error interpretations are right.
I could work out a small solution please check if it is going fine.
It is giving me result.
if __name__ == "__main__":
c1=Colors()
c2=c1.Blue()
c3=c1.Red()
Regards,
Subhabrata Banerjee.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-15 04:42 -0700
Re: Creating .exe file in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-15 13:07 +0100
Re: Creating .exe file in Python sohcahtoa82@gmail.com - 2015-06-15 10:09 -0700
Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-15 15:01 +0200
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-15 06:42 -0700
Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-15 16:44 +0200
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-15 07:03 -0700
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-15 07:40 -0700
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-15 09:11 -0700
Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-15 18:29 +0200
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-16 03:46 -0700
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-16 06:56 -0700
Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-16 17:04 +0200
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-16 08:17 -0700
Re: Creating .exe file in Python Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-16 10:00 -0600
Re: Creating .exe file in Python Chris Angelico <rosuav@gmail.com> - 2015-06-17 02:03 +1000
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-16 09:23 -0700
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 06:10 -0700
Re: Creating .exe file in Python Chris Angelico <rosuav@gmail.com> - 2015-06-17 23:20 +1000
Re: Creating .exe file in Python hamilton <hamilton@nothere.com> - 2015-06-17 07:33 -0600
Re: Creating .exe file in Python Chris Angelico <rosuav@gmail.com> - 2015-06-17 23:52 +1000
Re: Creating .exe file in Python Steven D'Aprano <steve@pearwood.info> - 2015-06-18 01:39 +1000
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 08:46 -0700
Re: Creating .exe file in Python Chris Angelico <rosuav@gmail.com> - 2015-06-18 01:58 +1000
Re: Creating .exe file in Python random832@fastmail.us - 2015-06-17 10:17 -0400
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 07:30 -0700
Re: Creating .exe file in Python Chris Angelico <rosuav@gmail.com> - 2015-06-18 00:38 +1000
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 06:33 -0700
Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-17 15:54 +0200
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 07:04 -0700
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 07:16 -0700
Re: Creating .exe file in Python Laura Creighton <lac@openend.se> - 2015-06-17 17:21 +0200
Re: Creating .exe file in Python subhabrata.banerji@gmail.com - 2015-06-17 08:30 -0700
csiph-web