Oops. Probably should hold the GIL when manipulating python objects...