Python Forum

Full Version: How to pause execution (on windows)?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Assume I have created a *.py script (on windows).
If I double click on it it is executed. But the command prompt windows vanishes immediately.
I cannot read output.

I need to write a kind of "pause" command into *.py script file to pause execution and let me read what is previously printed.

When I hit RETURN the processing should be resumed.

How can I achieve this?
Introduce a simple user input that does nothing:
input("Press enter to continue")