chmod a+x gui.py
just proved a inconsistent test is unnecessary, change it to assert