Back porting Diane's gerald.py from the trunk to v0.1.x branch