pyprof - Copyright 2001 Matthew Mueller <donut@azstarnet.com>
- What
- pyprof is a wrapper around python's profile module for easily profiling python scripts without having to specify the whole path to them if they are in $PATH, and with command line arg configurable behaviors.
- Why
- Currently to profile a python script, you have to either add support in the program, or run it with profile.py (or use interactive python..). But if the script isn't in the current dir, it results in long commands like /usr/lib/python1.5/profile.py /usr/bin/something foo
With pyprof, this command line would be: pyprof something foo
In addition, pyprof supports command line args to change its behavior, which running profile.py does not provide at all.
And what if something is actually an alias? Then pyprof something won't even
work. Well, if you use pyprof_auto:
PYPROF=x something foo
- Portability
- Should work anywhere python does.
- Install
- 1) make sure you have python-distutils installed (distutils is standard in python >= 1.6, otherwise see: http://www.python.org/sigs/distutils-sig/download.html ) 2) python setup.py install 3) optionally: add "import pyprof_auto" to sitecustomize.py
- Copying
- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See the file 'COPYING' for more information.
I would appreciate it if you make modifications if you would send them to me for possible inclusion in the main source.
You can get the latest version at
http://www.azstarnet.com/~donut/programs/
