That's strange.
To double-check that i typed it into my blog correctly, I copy-and-pasted the code from the post into my python IDE and it compiles and runs properly in my environment. For what it is worth, I am using Python 2.7 on a 64-bit windows machine. Maybe someone else reading has some ideas?
You should notice that after my example code, I have included two other people's code demos so that you can see the same algorithm from a different perspective. Maybe these will help you understand what's required.
In summary, for 2 dimensions, x and y coordinates of the n-th term (n = 1,2,3,....) are defined as:
g = 1.32471795724474602596090885447809
a1 = 1.0/g
a2 = 1.0/(g*g)
x[n] = (0.5+a1*n) %1
y[n] = (0.5+a2*n) %1
where %1 is the mod 1 operator and takes the fractional part of the argument.
Hope that helps.