End Command In Python Gui Application