B t `?ã@sGdd„deƒZdS)c@s2eZdZdZd dd„Zdd„Zdd„Zd d „Zd S) ÚStreamIndenteraMock-up of a file-like object that wraps another file-like object and indents all data using the specified string before passing it to the underlying file. Since this presents a full file interface, StreamIndenter objects may be arbitrarily nested.ú cCs ||_||_| ¡|_d|_dS)NT)ÚosÚindentÚrstripÚstripped_indentÚnewline)ÚselfZostreamr©r ú;/tmp/pip-unpacked-wheel-cqckmaqz/pyutilib/misc/indent_io.pyÚ__init__s zStreamIndenter.__init__cCs t|j|ƒS)N)Úgetattrr)rÚnamer r r Ú __getattr__szStreamIndenter.__getattr__cCsöt|ƒs dS| d¡}|jrL|dr<|j |j|d¡q\|j |j¡n|j |d¡t|ƒdkrrd|_dSxB|dd…D]2}|r |j d|j|¡q€|j d|j¡q€W|drà|j d|j|d¡d|_n|j d¡d|_dS)NÚ ééFééÿÿÿÿT)ÚlenÚsplitrrÚwriterr)rÚdataÚlinesÚliner r r rs(   zStreamIndenter.writecCsx|D]}| |¡qWdS)N)r)rÚsequenceÚxr r r Ú writelines4s zStreamIndenter.writelinesN)r)Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrrr r r r r s  rN)Úobjectrr r r r Ú ó