This code runs on a highly modified version of the Python Wikipedia framework, the standard version is terrible at handling network faults. It is provided here for interest and reference, don't try to run it as is! If you would like to use it, either steal (;-) all you like on your own responsibility, or ask me; I'll be very glad to help.
I will be trying to provide a more directly useful version!
You primarily want to look at mbwa.py.