Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
boto
/
mashups
/
File Content:
iobject.pyc
� �Wc @ s/ d d l Z d � Z d e f d � � YZ d S( i����Nc C s! y t | � t SWn t SXd S( N( t intt Truet False( t v( ( s8 /usr/lib/python2.7/site-packages/boto/mashups/iobject.pyt int_val_fn s t IObjectc B s5 e Z d d d � Z d d � Z d � Z d � Z RS( t s Enter Selectionc C s� | s d GHd Sd } x�| s�d } g } x� | D]� } t | t � ro d | | f GH| j | � | d 7} q1 | \ } } } | r� | j | � d k rd | | | f GH| j | � | d 7} qq1 | j | � d k r1 d | | f GH| j | � | d 7} q1 q1 W| r�t d | t | � f � } | j d � rH| d } q�y. t | � } | d k rgd S| | d } Wq�t k r�d | GHq�t k r�d | t | � f GHq�Xq d GHd } q W| S( Ns No Choices Availablei s [%d] %si s [%d] %s - %ss %s[1-%d]: t /s %s is not a valid choices %s is not within the range[1-%d]s No objects matched your patternR ( t Nonet isinstancet basestringt appendt findt raw_inputt lent startswithR t ValueErrort IndexError( t selft item_listt search_strt promptt choicet nt choicest itemt objt idt desct valt int_val( ( s8 /usr/lib/python2.7/site-packages/boto/mashups/iobject.pyt choose_from_list sN c C sT t } xG | sO t d | � } | rF | | � } | sL d | GHqL q t } q W| S( Ns %s: s Invalid value: %s( R R R ( R R t validation_fnt okayR ( ( s8 /usr/lib/python2.7/site-packages/boto/mashups/iobject.pyt get_stringN s c C s� t } d } x� | s� t d | | f � } t j j | � } t j j | � rX t } q t j j | � r� | } | j t j | � � } | r� t j j | | � } t } q� d } q d | GHd } q W| S( NR s %s: %ss Invalid value: %s( R R t ost patht expandusert isfileR t isdirR t listdirt join( R R R! R R$ ( ( s8 /usr/lib/python2.7/site-packages/boto/mashups/iobject.pyt get_filenameZ s"