U
    
W[                     @   s0   d dl mZmZ d dlmZ dd Zdd ZdS )    )absolute_importdivision)
intToBytesc                 C   s  |   } g }| r| dd dkrNg }|r6|d | || | dd  } q| dd dkr| }| dd  } |s| r~t|S qd}| ||d   r|d7 }q|stt| d | }| |d |d |  }|d | | |d | d  } qdstdd S )Nr         (   )zthis should not happen)stripappendpopAssertionErrorisdigitint)sexprZnewSexpZaListiZlengthdata r   9/usr/lib/python3/dist-packages/twisted/conch/ssh/sexpy.pyparse	   s4    
 
r   c                 C   s`   d}| D ]R}t |t dt g fkrB|d7 }|t|7 }|d7 }q|tt|d | 7 }q|S )N    r   r   r      :)typepackr   len)Zsexpr   or   r   r   r   $   s    
r   N)Z
__future__r   r   Ztwisted.python.compatr   r   r   r   r   r   r   <module>   s   