def _cook_slots(period, increment, width, height):
 tdiff = datetime.timedelta(minutes=increment)
 num = ((period.end - period.start).seconds / tdiff.seconds)
 s = period.start
 slots = []
 for i in range(num):
  sl = period.get_time_slot(s, (s + tdiff))
  sl.top = (int((height / float(num))) * i)
  sl.height = int((height / float(num)))
  slots.append(sl)
  s = (s + tdiff)
 return slots

def _cook_slots ( period , increment , width , height ) : tdiff = datetime . timedelta ( minutes = increment ) num = ( ( period . end - period . start ) . seconds / tdiff . seconds ) s = period . start slots = [ ] for i in range ( num ) : sl = period . get_time_slot ( s , ( s + tdiff ) ) sl . top = ( int ( ( height / float ( num ) ) ) * i ) sl . height = int ( ( height / float ( num ) ) ) slots . append ( sl ) s = ( s + tdiff ) return slots
prepare slots to be displayed on the left hand side calculate dimensions for each slot .