title: Using cProfile results with KCacheGrind
body: <p>I'm using cProfile to profile my Python program. Based upon <a href="http://blip.tv/file/1957086/" rel="noreferrer">this talk</a> I was under the impression that KCacheGrind could parse and display the output from cProfile.</p>
  
  <p>However, when I go to import the file, KCacheGrind just displays an 'Unknown File Format' error in the status bar and sits there displaying nothing.</p>
  
  <p>Is there something special I need to do before my profiling stats are compatible with KCacheGrind?</p>
  
  <pre><code>...
  if profile:
      import cProfile
  
      profileFileName = 'Profiles/pythonray_' + time.strftime('%Y%m%d_%H%M%S') + '.profile'
  
      profile = cProfile.Profile()
      profile.run('pilImage = camera.render(scene, samplePattern)')
  
      profile.dump_stats(profileFileName)
      profile.print_stats()
  else:            
      pilImage = camera.render(scene, samplePattern)
  ...
  </code></pre>
  
  <p><strong>Package Versions</strong></p>
  
  <ul>
  <li>KCacheGrind 4.3.1</li>
  <li>Python 2.6.2</li>
  </ul>