top of page

How To Pause Your Python Program After Running It As An .exe

  • Writer: Brian Clark
    Brian Clark
  • Oct 13, 2021
  • 1 min read

After you turn your python script into a .exe file, you may notice that the program opens and closes without you being able to use the program. To avoid this, you can add the following input towards the end of the program to exit the program when you are ready.





input('Press ENTER to exit')

Adding this line of code will allow you to press ENTER and end the program after it executes. Below is a simple example of this in action:




print("You must save ")

input('Press ENTER to exit')






Comments


bottom of page