code on webpy cookbook