There is a small bug while running some of the profiling code from within the profiler. Specifically: import profile x = profile.Profile() x.run("x.dump_stats('/tmp/foo')") I have a small 2 liner fix, but I doubt it is correct, merely a band-aid, so I won't post it. -- Jon