Profiling python scripts with cProfile and KCacheGrind

This is a very simple how-to about profiling python scripts using python's built in cProfile and KCacheGrind to visualize profiling data. Gathering profiling data Let's assume we have a script called test.py, its content can be for example very...