## Script (Python) "ts_team_get_members"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Get Team Members for Display

req_get = context.REQUEST.get

from Products.CMFPlone import Batch

uniq_members = {}

for tm in context.getTeams():
    mems = tm.getFilteredMembers()
    for mem in mems:
        uniq_members[mem.id] = mem
    
members = uniq_members.values()

batch = Batch( members,
               size = 100,
               start = req_get('b_start', 0),
               end = req_get('b_end', 0),
               )

return batch
