If anyone wants a copy, I ported the diffuse shader code to python 2 and 3 here: https://gist.github.com/wcarss/a6ff897fb9c50ac34875dbd5d8599...