Source

cstvru / pageWidget.py

def pagenator(count,page,step,link):
	if page == 0 :
		start = 0
	else :
		start = (page*step)-step
	button = (count/step)+1
	button = range(1,button+1)
	step = page*step
	par = {}
	par={'start':start,'button':button,'step':step,'link':link,'page':page}
	return par