Mar-16-2017, 09:10 PM
What kind of button press? Keyboard in a terminal, or a GUI?
In either case, you'll probably want your loop to execute in a thread that checks a condition that the "presentation" component of your code is able to modify.
In either case, you'll probably want your loop to execute in a thread that checks a condition that the "presentation" component of your code is able to modify.