user1027046 user1027046 - 6 months ago 31
Python Question

how to pause a program until a button is pressed

I am using py2exe to make executable.
I want to know how to pause the program until a button is pressed.. just like we do in C using


As the program terminates automatically in windows, I need this tool.

Is there anything better than py2exe which does similar work ?


You can use raw_input in Python2, or input in Python 3

raw_input("Press Enter to terminate.")