Python 3 compatibility (attempt)

Let's see if this works...