Python module to deal with time grids