Python Forum
how to enter a pause in the middle of a file - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: how to enter a pause in the middle of a file (/thread-3658.html)



how to enter a pause in the middle of a file - sylas - Jun-11-2017

Hi all. With C++ I stop running for a pause with cin.get(), I tell to the user "Press ENTER to continue". What is the equivalent with python ??

my code here



RE: how to enter a pause in the middle of a file - ichabod801 - Jun-11-2017

input('Press ENTER to continue: ')
Although, if you are running Python 2.x, you will want to use raw_input instead. In Python 2.x input will try to evaluate the text that it gets, which may cause an error.


RE: how to enter a pause in the middle of a file - sylas - Jun-11-2017

Many thanks. It works well. Very simple indeed !