To install mechanize for python under /tmp.
mkdir -p /tmp/jaikuslurp/lib/python
curl http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz | \
(cd /tmp/jaikuslurp; tar zxf -)
cd /tmp/jaikuslurp/mechanize-0.2.5
export PYTHONPATH=/tmp/jaikuslurp/lib/python/
python setup.py install --home=/tmp/jaikuslurp
python -c 'import mechanize'Next, one would do the above in the jaikuslurp script, and translate the Ruby portion to Python (I think mechanize for python should be fairly equivalent).