New Gram.py Script for 6.0

Like this?

for person in people():
    for ref in person.references:
        row(person, ref.rel, ref.reference)