Update button.py

Attribution to Martin O'Hanlon