Generic useful bits of python code written or adapted by Suzanne Aigrain