End Command In Python Gui Applications