Creating .exe file in Python

subhabrata.banerji at gmail.com subhabrata.banerji at gmail.com
Wed Jun 17 09:10:45 EDT 2015


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

Dear Group,

Thank you all. It seems going fine now. I have one additional question if I run the .exe files created in Non Python Windows environment. Linux has Python builtin but in Non Python environment how may I run it? Is there any set of prequisites I have to follow. I am not finding much web help, if any one may kindly suggest. 

Regards,
Subhabrata Banerjee.



More information about the Python-list mailing list