Mod Snake: Installation And Usage | ||
---|---|---|
Prev |
As of Python release 1.5.2, a broken version of profile.py is shipped with Python. According to tim_one at sourceforge.net (a Python developer), this is not a bug, but is something one should just 'not do.' A hack is provided with mod_snake to allow profiling to work. To use it, the following steps should be taken:
Copy the system's profile.py into the snake_lib directory, or another location where your Python modules are loaded.
bash$ cp /usr/lib/python-2.0/profile.py /path/to/mod_snake/snake_lib/profile2.py |
Change into the directory containing the new profile2.py and patch it with the profile2.patch which ships with mod_snake.
bash$ patch -p0 < profile2.patch |
After those steps, profiling should work with all modules