title: How can I analyze a file created with pstats.dump_stats(filename) off line?
body: <p>I have essentially done the following:</p>
  
  <pre><code>import cProfile, pstats, StringIO
  pr = cProfile.Profile()
  pr.enable()
  # ... my code did something ...
  pr.disable()
  s = StringIO.StringIO()
  sortby = 'cumulative'
  ps = pstats.Stats(pr, stream=s).sort_stats(sortby)
  
  ps.dump_stats('stats.dmp')  # dump the stats to a file named stats.dmp
  </code></pre>
  
  <p>So now i have the file named 'stats.dmp' stored offline.</p>
  
  <p>How can i use pstats to analyze this file for human consumption?</p>
  
  <p>Thanks in advance.</p>