import pstats p = pstats.Stats("run.stats") p.print_stats()