'Get "pages" worth of objects that start with a prefix.
The optional keyword arguments ``marker``, ``end_marker``, and
``reverse`` are used similar to how they are for containers. We\'re
either coming:
- directly from ``_listing_iter``, in which case none of the
optional args are specified, or
- from ``_in_proxy_reverse_listing``, in which case ``reverse``
is ``False`` and both ``marker`` and ``end_marker`` are specified
(although they may still be blank).'

def _listing_pages_iter(self, account_name, lcontainer, lprefix, env, marker='', end_marker='', reverse=True):

    while True:
        lreq = make_pre_authed_request(env, method='GET', swift_source='VW', path=('/v1/%s/%s' % (account_name, lcontainer)))
        lreq.environ['QUERY_STRING'] = ('format=json&prefix=%s&marker=%s' % (quote(lprefix), quote(marker)))
        if end_marker:
            lreq.environ['QUERY_STRING'] += ('&end_marker=%s' % quote(end_marker))
        if reverse:
            lreq.environ['QUERY_STRING'] += '&reverse=on'
        lresp = lreq.get_response(self.app)
        if (not is_success(lresp.status_int)):
            close_if_possible(lresp.app_iter)
            if (lresp.status_int == HTTP_NOT_FOUND):
                raise ListingIterNotFound()
            elif is_client_error(lresp.status_int):
                raise HTTPPreconditionFailed()
            else:
                raise ListingIterError()
        if (not lresp.body):
            break
        sublisting = json.loads(lresp.body)
        if (not sublisting):
            break
        first_item = sublisting[0]['name'].encode('utf-8')
        last_item = sublisting[(-1)]['name'].encode('utf-8')
        page_is_after_marker = (marker and (first_item > marker))
        if (reverse and ((first_item < last_item) or page_is_after_marker)):
            (yield self._in_proxy_reverse_listing(account_name, lcontainer, lprefix, env, marker, sublisting))
            return
        marker = last_item
        (yield sublisting)
