Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
keep cmd open
#1
i just made an exe file with pyinstaller (both in linux and in windows).

when i run the program in windows (cmd) - it closes the window when the last output of the program is given...

what do i add to the script in order to keep the window opened ?

thanks !
Reply
#2
just ope the cmd and run the program from there, don't double click on it
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

Reply
#3
Can do it like this.
# hello.py
print('hello world')
input('Press <Enter> to exit')
Reply
#4
alright !!
Reply


Forum Jump:

User Panel Messages

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