The logic programming bits in particular (the core of the Prolog interpreter) can be read in a maybe-nicer way here: http://dhconnelly.com/paip-python/docs/paip/logic.html