def to_pages(window):
	"""Separates 1d array of lines into a 2d array of pages which have a max length of window.page_length"""
	pages = []
	cpy = list(window.lines)
	while (cpy):
		pages.append(cpy[:window.page_length])
		cpy = cpy[window.page_length:]
	return pages