Skip to content

Instantly share code, notes, and snippets.

@plindberg
Created January 6, 2012 17:04
Show Gist options
  • Select an option

  • Save plindberg/1571447 to your computer and use it in GitHub Desktop.

Select an option

Save plindberg/1571447 to your computer and use it in GitHub Desktop.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment