Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create .exe with
Good morning all,

I want to create an .exe file with my Python program, so I can use it anywhere.

I installed pyinstaller, started the command on my, several files were created (dist, build, etc). Everything goes well.

However, when I run the .exe file "dist", I do not have time to see the result of my program that it closes live. Maybe it is necessary to add a command line in my program so that it is put in "pause"?

In C, I remember that this command was more or less like this:

Quote:system ( "pause")
Maybe you are looking for this: time.sleep()
there are two possibilities - either your program finishes too fast or there is problem and your exe actually crashes.

to see if it is the former - don't run it by double-click with mouse, but open cmd, change current working directory to one where your exe is and run it from command prompt. This way it will not close the cmd when the execution ends
in this case you can add
input('Press any key...')
at the end and it will wait to press a key before execution ends.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs


Possibly Related Threads…
Thread Author Replies Views Last Post
  Create a program aien33 1 368 Jun-17-2020, 05:56 AM
Last Post: SheeppOSU
  Create a program that PING a list of IPs skaailet 7 749 Mar-26-2020, 10:46 PM
Last Post: snippsat
  How to create an environment for program downloaded from github StartedNewLife 3 499 Jan-25-2020, 06:34 PM
Last Post: ibreeden
  how to create useful neural network program? hsunteik 1 1,598 Feb-04-2017, 11:32 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020