Thanks to Douglas Soares de Andrade, web2py trunk now works with Python 2.4 but it requires installing the following packages:
easy_install-2.4 -U pysqlite hashlib