Just a grid class in python