Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
boto
/
File Content:
resultset.pyc
� �Wc @ s@ d d l m Z d e f d � � YZ d e f d � � YZ d S( i����( t Usert ResultSetc B s8 e Z d Z d d � Z d � Z d d � Z d � Z RS( s& The ResultSet is used to pass results back from the Amazon services to the client. It is light wrapper around Python's :py:class:`list` class, with some additional methods for parsing XML results from AWS. Because I don't really want any dependencies on external libraries, I'm using the standard SAX parser that comes with Python. The good news is that it's quite fast and efficient but it makes some things rather difficult. You can pass in, as the marker_elem parameter, a list of tuples. Each tuple contains a string as the first element which represents the XML element that the resultset needs to be on the lookout for and a Python class as the second element of the tuple. Each time the specified element is found in the XML, a new instance of the class will be created and popped onto the stack. :ivar str next_token: A hash used to assist in paging through very long result sets. In most cases, passing this value to certain methods will give you another 'page' of results. c C s� t j | � t | t � r( | | _ n g | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ t | _ d | _ t | _ d S( N( t listt __init__t isinstancet markerst Nonet markert key_markert next_markert next_key_markert next_upload_id_markert next_version_id_markert next_generation_markert version_id_markert Falset is_truncatedt next_tokent Truet status( t selft marker_elem( ( s2 /usr/lib/python2.7/site-packages/boto/resultset.pyR . s c C sh xB | j D]7 } | | d k r | d | � } | j | � | Sq W| d k rd t � | _ | j Sd S( Ni i t Owner( R t appendR t ownerR ( R t namet attrst connectiont tt obj( ( s2 /usr/lib/python2.7/site-packages/boto/resultset.pyt startElement@ s t truec C s | | k r t St Sd S( N( R R ( R t valuet true_value( ( s2 /usr/lib/python2.7/site-packages/boto/resultset.pyt to_booleanN s c C si | d k r! | j | � | _ nD| d k r9 | | _ n,| d k rQ | | _ n| d k ri | | _ n�| d k r� | | _ n�| d k r� | | _ n�| d k r� | | _ n�| d k r� | | _ n�| d k r� | | _ n�| d k r� | | _ nl| d k r| | _ nT| d k r/t | � | _ n6| d k rMt | � | _ n| d k re| | _ n | d k r�| j | � | _ n� | d k r�| j | d � | _ n� | d k r�| j | � n� | d k r�| | _ n� | d k r�| | _ | | _ nf | d k r1y | j t | � 7_ WqeqeXn4 | d k rU| j | d � | _ n t | | | � d S( Nt IsTruncatedt Markert KeyMarkert NextMarkert NextKeyMarkert VersionIdMarkert NextVersionIdMarkert NextGenerationMarkert UploadIdMarkert NextUploadIdMarkert Buckett MaxUploadst MaxItemst Prefixt returnt StatusCodet Successt ItemNamet NextTokent nextTokent BoxUsaget IsValidR ( R"