It strikes me now that I never checked this for python3 compatibility; this is a line in particular which will certainly break.  I'll defer to Rob about the resolution.