B ¥.¦^1 ã@sddlZGdd„dƒZdS)éNc@sLeZdZdd„Zdd„Zejfdd„Zdd„Zdd d „Z d d „Z dd„Z dS)Ú ContainerIOcCs(||_d|_||_||_|j |¡dS)z­ Create file object. :param file: Existing file. :param offset: Start of region, in bytes. :param length: Size of region, in bytes. rN)ÚfhÚposÚoffsetÚlengthÚseek)ÚselfÚfilerr©r ú3/tmp/pip-install-mwhup7aw/Pillow/PIL/ContainerIO.pyÚ__init__s zContainerIO.__init__cCsdS)NFr )rr r r Úisatty*szContainerIO.isattycCs`|dkr|j||_n|dkr,|j||_n||_tdt|j|jƒƒ|_|j |j|j¡dS)a Move file pointer. :param offset: Offset in bytes. :param mode: Starting position. Use 0 for beginning of region, 1 for current offset, and 2 for end of region. You cannot move the pointer outside the defined region. éérN)rrÚmaxÚminrrr)rrÚmoder r r r-s zContainerIO.seekcCs|jS)ze Get current file pointer. :returns: Offset from start of region, in bytes. )r)rr r r Útell@szContainerIO.tellrcCsT|rt||j|jƒ}n |j|j}|ss