the python catch code