MrHooker is a command-line tool for hooking function calls in Cython, using LD_PRELOAD. Hooks are written in `Cython <http://cython.org>`_ (a dialect of Python), and compiled on the fly. MrHooker will take care of setting up the environment, initializing Python in the child process, and cleaning up afterwards.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.