403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/breezy/__pycache__/iterablefile.cpython-313.pyc
�

p��gm"���SSKJrJr SSKJrJr "SS5r"SS5r\S:XaSSK	r	\	R"5 gg)	�)�Iterable�Iterator)�Callable�Optionalc��\rSrSrSrS\\SS4SjrS\S\4Sjr	SS	\S\
\S\4S
jjrS\\/\
\4S\4Sjr
S\4S
jrS\SS4SjrSrg)�IterableFileBase�z+Create a file-like object from any iterable�iterable�returnNc�j�[RU5 [U5UlSUlSUlg)N�F)�object�__init__�iter�_iter�_buffer�done��selfr
s  �5/usr/lib/python3/dist-packages/breezy/iterablefile.pyr�IterableFileBase.__init__s'��������(�^��
������	r
�lengthc�2^�U4SjnURU5$)zQ
>>> IterableFileBase([b'This ', b'is ', b'a ', b'test.']).read_n(8)
b'This is '
c�(>�[U5T:�aT$g�N)�len)�resultrs �r�test_length�,IterableFileBase.read_n.<locals>.test_length)s����6�{�f�$��
�r
��_read)rrrs ` r�read_n�IterableFileBase.read_n#s���	��z�z�+�&�&r
�sequencec�6^^�UU4SjnURU5$)z�
>>> f = IterableFileBase([b'Th\nis ', b'is \n', b'a ', b'te\nst.'])
>>> f.read_to(b'\n')
b'Th\n'
>>> f.read_to(b'\n')
b'is is \n'
c�>�Tb[U5T:�aT$URT5[T5-$![a gf=fr)r�index�
ValueError)rrr$s ��r�
test_contents�/IterableFileBase.read_to.<locals>.test_contents:sI����!��v�;�&�(�!�M�
��|�|�H�-��H�
�=�=���
��
�s�4�
A�Ar )rr$rr)s `` r�read_to�IterableFileBase.read_to1s���	��z�z�-�(�(r
�
result_lengthc���URnU"U5c$U[UR5-
nU"U5cM$U"U5nX#SUlUSU$![a SUlSUlUs$f=f)a&
Read data until result satisfies the condition result_length.
result_length is a callable that returns None until the condition
is satisfied, and returns the length of the result to use when
the condition is satisfied.  (i.e. it returns the length of the
subset of the first condition match.)
NTr
)r�nextr�
StopIterationr)rr-r�
output_lengths    rr!�IterableFileBase._readEs��������F�#�+�
��$�t�z�z�*�*���F�#�+�&�f�-�
��n�-����n�}�%�%��
!�
� ��	�"����
�
�s�A�A-�,A-c�*�SnURU5$)zY
>>> IterableFileBase([b'This ', b'is ', b'a ', b'test.']).read_all()
b'This is a test.'
c��gr�)rs r�no_stop�*IterableFileBase.read_all.<locals>.no_stop_s��r
r )rr6s  r�read_all�IterableFileBase.read_allYs��	��z�z�'�"�"r
�contentsc�*�XR-Ulg)z�
>>> f = IterableFileBase([b'Th\nis ', b'is \n', b'a ', b'te\nst.'])
>>> f.read_to(b'\n')
b'Th\n'
>>> f.push_back(b"Sh")
>>> f.read_all()
b'Shis is \na te\nst.'
N)r)rr:s  r�	push_back�IterableFileBase.push_backds�� �,�,�.��r
)rrrr)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r�bytesr�intr"rr+rr!r8r<�__static_attributes__r5r
rrrs���5���%���T��'�S�'�U�'�)��)�x��}�)��)�(&�8�U�G�X�c�]�,B�#C�&��&�(	#�%�	#�	/�%�	/�D�	/r
rc��\rSrSrSrS\\SS4SjrS\\4Sjr	Sr
SS	jr\"S
5r
SrSrSS
jrS\4SjrS\\4SjrSS\\S\4SjjrSS\S\\S\4SjjrSS\\S\4SjjrSS\\4SjjrSrg)�IterableFile�pzEThis class supplies all File methods that can be implemented cheaply.r
rNc��[RU5 [U5UlUR	5UlSUlSUlg)NFr)rrr�
_file_base�_make_iteratorr�_closed�	softspacers  rr�IterableFile.__init__ss8�������*�8�4����(�(�*��
������r
c#��# �URR(dSUR5 URRS5nUS:waUv� URR(dMRgg7f)N�
r
)rJr�
_check_closedr+)rrs  rrK�IterableFile._make_iteratorzsP����/�/�&�&���� ��_�_�,�,�U�3�F���}���	�/�/�&�&�&�s�A,A2�0A2c�<�UR(a[S5eg)NzFile is closed.)�closedr(�rs rrQ�IterableFile._check_closed�s���;�;��.�/�/�r
c�4�SURlSUlg)zn
>>> f = IterableFile([b'This ', b'is ', b'a ', b'test.'])
>>> f.closed
False
>>> f.close()
>>> f.closed
True
TN)rJrrLrUs r�close�IterableFile.close�s�� $�������r
c��UR$r)rL)�xs r�<lambda>�IterableFile.<lambda>�s���	�	r
c��U$rr5rUs r�	__enter__�IterableFile.__enter__�s���r
c�N�UR5 g![a Ucegf=f)NF)rX�
BaseException)r�exc_type�exc_val�exc_tbs    r�__exit__�IterableFile.__exit__�s7��	��J�J�L����	���� ��	�s��$�$c�$�UR5 g)z�No-op for standard compliance.
>>> f = IterableFile([])
>>> f.close()
>>> f.flush()
Traceback (most recent call last):
ValueError: File is closed.
N)rQrUs r�flush�IterableFile.flush�s��	
���r
c�L�UR5 [UR5$)a�Implementation of the iterator protocol's next()

>>> f = IterableFile([b'This \n', b'is ', b'a ', b'test.'])
>>> next(f)
b'This \n'
>>> f.close()
>>> next(f)
Traceback (most recent call last):
ValueError: File is closed.
>>> f = IterableFile([b'This \n', b'is ', b'a ', b'test.\n'])
>>> next(f)
b'This \n'
>>> next(f)
b'is a test.\n'
>>> next(f)
Traceback (most recent call last):
StopIteration
)rQr/rrUs r�__next__�IterableFile.__next__�s��&	
�����D�J�J��r
c��U$)a
>>> list(IterableFile([b'Th\nis ', b'is \n', b'a ', b'te\nst.']))
[b'Th\n', b'is is \n', b'a te\n', b'st.']
>>> f = IterableFile([b'Th\nis ', b'is \n', b'a ', b'te\nst.'])
>>> f.close()
>>> list(f)
Traceback (most recent call last):
ValueError: File is closed.
r5rUs r�__iter__�IterableFile.__iter__�s	���r
rc��UR5 UcURR5$URRU5$)a>
>>> IterableFile([b'This ', b'is ', b'a ', b'test.']).read()
b'This is a test.'
>>> f = IterableFile([b'This ', b'is ', b'a ', b'test.'])
>>> f.read(10)
b'This is a '
>>> f = IterableFile([b'This ', b'is ', b'a ', b'test.'])
>>> f.close()
>>> f.read(10)
Traceback (most recent call last):
ValueError: File is closed.
)rQrJr8r")rrs  r�read�IterableFile.read�s=��	
�����>��?�?�+�+�-�-��?�?�)�)�&�1�1r
r$�sizec�X�UR5 URRX5$)a_
Read characters until a sequence is found, with optional max size.
The specified sequence, if found, will be included in the result

>>> f = IterableFile([b'Th\nis ', b'is \n', b'a ', b'te\nst.'])
>>> f.read_to(b'i')
b'Th\ni'
>>> f.read_to(b'i')
b's i'
>>> f.close()
>>> f.read_to(b'i')
Traceback (most recent call last):
ValueError: File is closed.
)rQrJr+)rr$rts   rr+�IterableFile.read_to�s%��	
�������&�&�x�6�6r
c�&�URSU5$)z�
>>> f = IterableFile([b'Th\nis ', b'is \n', b'a ', b'te\nst.'])
>>> f.readline()
b'Th\n'
>>> f.readline(4)
b'is i'
>>> f.close()
>>> f.readline()
Traceback (most recent call last):
ValueError: File is closed.
rP)r+)rrts  r�readline�IterableFile.readline�s���|�|�E�4�(�(r
c��/nUR5nUS:XaU$UcURU5 OL[U5U:a URU5 U[U5-nOURR	U5 U$M{)a
>>> f = IterableFile([b'Th\nis ', b'is \n', b'a ', b'te\nst.'])
>>> f.readlines()
[b'Th\n', b'is is \n', b'a te\n', b'st.']
>>> f = IterableFile([b'Th\nis ', b'is \n', b'a ', b'te\nst.'])
>>> f.close()
>>> f.readlines()
Traceback (most recent call last):
ValueError: File is closed.
r
)rx�appendrrJr<)r�sizehint�lines�lines    r�	readlines�IterableFile.readlines�sw�� ����=�=�?�D��s�{��������T�"��T��X�%����T�"��C��I�%�����)�)�$�/���r
)rLrJrrM)rNr)r>r?r@rArBrrCrrrKrQrX�propertyrTr_rfrirlrorrDrrr+rx�listrrEr5r
rrGrGps���O���%���T�������0�
��)�
*�F���� �%� �,
�(�5�/�
�2�8�C�=�2�E�2�&7��7�X�c�]�7�e�7�$)�X�c�]�)�e�)��$�u�+��r
rG�__main__N)�collections.abcrr�typingrrrrGr>�doctest�testmodr5r
r�<module>r�sC��,/�%�S/�S/�le�e�P�z����O�O��r

Youez - 2016 - github.com/yon3zu
LinuXploit