py3 compatibility (print statement to function)

It's been half a decade since you wrote this, but it's even more valuable now that wikispaces is kicking out non-education wikis.

But now Python 3 is way more prevalent.