useful python debugging functions