Simple page navigation

Create a Page object (the 3 arguments are: request, list of items, number of items per page) and use its attributes (items, prev, next) to link to previous and next page

<div py:set="page Page(request, directory.file('/web/tables/woodyallen.csv'), 10)">
<p py:sub="for item in page.items: item.quote+'<hr>'">quote</p>
<a href="page.htm" py:attr="page.prev">Previous</a> -
Page <span py:sub="page.num">x</span> / <span py:sub="">y</span> -
<a href="page.htm" py:attr="">Next</a>

See example page