python-profiler für python2.4 unter Debian Squeeze
Da man für manche Pakete wie z.B. Plone 3 noch python2.4 benötigt, sei hier kurz erklärt wie man python-profile, welches zum testen benötigt wird installiert.
Wir installieren das paket python-profiler:
aptitude install python-profiler
aus lenny installieren wir python2.4:
aptitude install python2.4
mit dpkg lassen wir uns die enthaltenen Dateien von python-profiler anzeigen:
dpkg -L python-profiler
/.
/usr
/usr/lib
/usr/lib/python2.5
/usr/lib/python2.5/profile.py
/usr/lib/python2.5/pstats.py
/usr/lib/python2.6
/usr/lib/python2.6/profile.py
/usr/lib/python2.6/pstats.py
/usr/share
/usr/share/doc
/usr/share/doc/python-profiler
/usr/share/doc/python-profiler/copyright
/usr/share/doc/python-profiler/README.Debian
/usr/share/doc/python-profiler/changelog.Debian.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/python-profiler
Nun gehen wir in das Verzeichnis /usr/lib/python2.4 und erzeugen dort 2 Symlinks auf die folgenden Dateien:
cd /usr/lib/python2.4
planetbase:/usr/lib/python2.4# ln -s ../python2.5/pstats.py
planetbase:/usr/lib/python2.4# ln -s ../python2.5/profile.py
Jetzt können wir den profiler in python2.4 verwenden.