pygame is
Simple DirectMedia Layer is
Site Swing
Layer Profiler

Layer Profiler - 4

Joe Wreschnig (piman)



The Layer Profiler is a standalone or pure-Python importable module to help you profile your programs interactively or offline. It is a single file which has no dependencies beyond PyGTK+. It hooks into your PyGTK, pyglet, or Pygame application with minimum fuss. The only dependencies are on Python 2.4 and PyGTK 2.12. It is licensed under the GNU LGPL


The Layer Profiler can now start a program from the command line, and so can be used to profile applications without an event loop. More documentation has been added to the website.


Home Page:


click to view original size


Layer Profiler - 6 - Sep 30, 2009
Layer Profiler - 4 - Jun 10, 2009
Layer Profiler - 1 - May 5, 2009 account Comments

If you wish to leave a comment with your account, please sign in first.

May 11, 2009 6:11pm - Stuart Axon - nickname: (stuaxo)
If you could specify a python program to profile (and it's paramters) on the commandline, this would be awesome...
May 8, 2009 3:45am - Luca Fabbri - nickname: (keul)
There's a way to use this in a pygame-only environment? For projects where pyglet is not used at all?
May 7, 2009 6:12pm - Claudio Canepa - nickname: (claxo)
thanks, piman.<br>
I will try now !
May 7, 2009 3:55am - Joe Wreschnig - nickname: (piman)
Here's some example code, if you use pyglet:

import profiler
profiler.pyglet() # set up GTK+ with pyglet
profiler.GProfiler().show() # show the window

Really, that's it.
May 6, 2009 12:51am - patrick mullen - nickname: (saluk)
Much better than the existing profiler. This is now in my toolbox, thanks for sharing!
May 5, 2009 9:38pm - Claudio Canepa - nickname: (claxo)
Interesting !. Can you modify one of the examples in the pyglet distro ( or cocos ) to see how you implant the profiler ?
May 5, 2009 3:51pm - Luca Fabbri - nickname: (keul)
There is a little lack of documentation. Can you put en example that show how to use it to profile some custom code?
May 5, 2009 9:35am - Luca Fabbri - nickname: (keul)
Wow! Seems a great project! I will try it for sure as I have time!

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
May 27, 2016

May 22, 2016

May 21, 2016

May 18, 2016

May 1, 2016

Mar 27, 2016

Mar 26, 2016

Mar 22, 2016

Mar 19, 2016

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)