You might add a tiny example of a microframework such as Bottle, Flask or an example from Pyramid written in the microframework-ish style.
Recommending `sudo` with `pip install` to a novice is not a good idea. System package manager or `pip install --user` could be used as alternatives. `virtualenv` might be out of topic for a short tutorial.
On my informal benchmark of JSON parsing speed, simplejson was 27x faster than json.
The idiom I've been using is:
try:
import simplejson as json
except ImportError:
import jsonIt is the externally maintained version of the json library contained in Python 2.6, but maintains compatibility with Python 2.5 and (currently) has significant performance advantages, even without using the optional C extension for speedups. </quote> http://simplejson.readthedocs.org/en/latest/index.html
I see there are performance patches to stdlib's json since 2.6: http://hg.python.org/cpython/search/?rev=_json.c&revcoun...
An order of magnitude difference might be an issue with your python installation.
On my machine version from 2.6 (1.9) is 15 times slower than from 2.7 (2.0.9). Though simplejson (2.2.1) is still faster on both 40 and 2 times correspondingly for .loads() timeline.js from the example as measured by:
% timeit json.loads(timeline_text)
it seems that C speedups available on both versions: python -v -c'import json' 2>&1 | grep _json.so
python -c'import json.decoder as d; print d.scanstring'
Is your python version old? Otherwise it is worth to open issues at http://bugs.python.org to merge speed improvements and at https://github.com/simplejson/simplejson/issues to mention in the docs and on http://pypi.python.org/pypi/simplejson more clearly that Python 2.7+ stdlib's version is also slower.A question: is lxml what we would use today instead of Beautiful Soup?
Note: Lxml has a number of repair modes that allows it to parse virtually anything. Cpu cycles and memory go up quite a bit when they're activated, but it's still better than BeautifulSoup.
If I try to return the innerHTML of #content, I get '<div id=“content”><content>’ as a string, nothing else.
While I know that’s inexcusable markup, it’s nothing I have control over.
lxml (if it builds on the target system) has been much better for my scripts.