Problem in Building a Simple EXE

Peter Hansen peter at engcorp.com
Thu May 26 07:42:01 EDT 2005


ParE wrote:
>    I wrote a small script which I have been trying to
> convert to an Executable.  I have tried py2exe and
> McMillians.  Both will convert it just fine but when I
> run it on a machine that does not have Python
> installed it will run the script twice. Any ideas on
> how I may fix this?

I think (unless someone else recognizes this problem) that you'll have 
to explain more about the situation.  What does "run twice" really mean? 
  How are you running it (command line, and icon, or what)?  Have you 
tried reducing your script down to the smallest version that still 
causes the undesirable behaviour?

For example, if you use the same techniques to compile, install, and run 
the following script, does it still "run twice" (whatever that means)?

if __name__ == '__main__':
     print "I'm running now."


-Peter



More information about the Python-list mailing list