Your IP : 3.15.15.225


Current Path : /opt/alt/python313/lib64/python3.13/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/__pycache__/_pyio.cpython-313.opt-1.pyc

�

,}gfl���SrSSKrSSKrSSKrSSKrSSKrSSKrSSKJr	 \RS;aSSKJr
 OSr
SSKrSSKJrJrJrJr 1Skr\"\S5(a6\R+\R,5 \R+\R.5 S	r\r\"\S
5=(d \R4R6rS.Sjr\S/Sj5rS
r \RBr!\RFr#"SS\RLS9r'\RNRQ\'5 "SS\'5r)\RRRQ\)5 SSK*J+r+ \)RQ\+5 "SS\'5r,\RXRQ\,5 "SS\,5r-"SS\,5r."SS\-5r/"SS\-5r0"S S!\,5r1"S"S#\0\/5r2"S$S%\)5r+"S&S'\'5r3\RfRQ\35 "S(S)\Rh5r5"S*S+\35r6"S,S-\65r7g!\"a \ r!GNIf=f!\"a "SS\$\%5r#GNUf=f)0z)
Python implementation of the io module.
�N)�
allocate_lock>�win32�cygwin)�setmode)�__all__�SEEK_SET�SEEK_CUR�SEEK_END>r���	SEEK_HOLEi �gettotalrefcountc���Uca[RR(aSnOSn[RR(aSSKnURS[US-5 U$)a�
A helper function to choose the text encoding.

When encoding is not None, this function returns it.
Otherwise, this function returns the default text encoding
(i.e. "locale" or "utf-8" depends on UTF-8 mode).

This function emits an EncodingWarning if *encoding* is None and
sys.flags.warn_default_encoding is true.

This can be used in APIs with an encoding=None parameter
that pass it to TextIOWrapper or open.
However, please consider using encoding="utf-8" for new APIs.
N�utf-8�localerz"'encoding' argument not specified.r)�sys�flags�	utf8_mode�warn_default_encoding�warnings�warn�EncodingWarning)�encoding�
stacklevelrs   �,/opt/alt/python313/lib64/python3.13/_pyio.py�
text_encodingr(sN�����9�9����H��H��9�9�*�*���M�M�>�)�:��>�
;��O�c��[U[5(d[R"U5n[U[[
[45(d[
SU-5e[U[5(d[
SU-5e[U[5(d[
SU-5eUb#[U[5(d[
SU-5eUb#[U[5(d[
SU-5e[U5nU[S5-
(d[U5[U5:�a[SU-5eSU;n	S	U;n
S
U;nSU;nSU;n
S
U;nSU;nU(aU(a[S5eX�-U-U-S:�a[S5eU	(d U
(dU(dU(d[S5eU(aUb[S5eU(aUb[S5eU(aUb[S5eU(a!US:XaSSK
nURS[S5 [UU	=(a S=(d SU
=(a S	=(d S-U=(a S
=(d S-U=(a S=(d S-U
=(a S=(d S-XgS9nUnSnUS:XdUS:aUR5(aSnSnUS:a=[n[R "UR#55R$nUS:�aUnUS:a[S5eUS:XaU(aU$[S5eU
(a
[+UU5nODU	(dU(dU(a
[-UU5nO"U
(a
[/UU5nO[S U-5eUnU(aU$[1U5n[3UX4UU5nUnXlU$![&[(4a N�f=f! UR75 e=f)!a`Open file and return a stream.  Raise OSError upon failure.

file is either a text or byte string giving the name (and the path
if the file isn't in the current working directory) of the file to
be opened or an integer file descriptor of the file to be
wrapped. (If a file descriptor is given, it is closed when the
returned I/O object is closed, unless closefd is set to False.)

mode is an optional string that specifies the mode in which the file is
opened. It defaults to 'r' which means open for reading in text mode. Other
common values are 'w' for writing (truncating the file if it already
exists), 'x' for exclusive creation of a new file, and 'a' for appending
(which on some Unix systems, means that all writes append to the end of the
file regardless of the current seek position). In text mode, if encoding is
not specified the encoding used is platform dependent. (For reading and
writing raw bytes use binary mode and leave encoding unspecified.) The
available modes are:

========= ===============================================================
Character Meaning
--------- ---------------------------------------------------------------
'r'       open for reading (default)
'w'       open for writing, truncating the file first
'x'       create a new file and open it for writing
'a'       open for writing, appending to the end of the file if it exists
'b'       binary mode
't'       text mode (default)
'+'       open a disk file for updating (reading and writing)
========= ===============================================================

The default mode is 'rt' (open for reading text). For binary random
access, the mode 'w+b' opens and truncates the file to 0 bytes, while
'r+b' opens the file without truncation. The 'x' mode implies 'w' and
raises an `FileExistsError` if the file already exists.

Python distinguishes between files opened in binary and text modes,
even when the underlying operating system doesn't. Files opened in
binary mode (appending 'b' to the mode argument) return contents as
bytes objects without any decoding. In text mode (the default, or when
't' is appended to the mode argument), the contents of the file are
returned as strings, the bytes having been first decoded using a
platform-dependent encoding or using the specified encoding if given.

buffering is an optional integer used to set the buffering policy.
Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
line buffering (only usable in text mode), and an integer > 1 to indicate
the size of a fixed-size chunk buffer.  When no buffering argument is
given, the default buffering policy works as follows:

* Binary files are buffered in fixed-size chunks; the size of the buffer
  is chosen using a heuristic trying to determine the underlying device's
  "block size" and falling back on `io.DEFAULT_BUFFER_SIZE`.
  On many systems, the buffer will typically be 4096 or 8192 bytes long.

* "Interactive" text files (files for which isatty() returns True)
  use line buffering.  Other text files use the policy described above
  for binary files.

encoding is the str name of the encoding used to decode or encode the
file. This should only be used in text mode. The default encoding is
platform dependent, but any encoding supported by Python can be
passed.  See the codecs module for the list of supported encodings.

errors is an optional string that specifies how encoding errors are to
be handled---this argument should not be used in binary mode. Pass
'strict' to raise a ValueError exception if there is an encoding error
(the default of None has the same effect), or pass 'ignore' to ignore
errors. (Note that ignoring encoding errors can lead to data loss.)
See the documentation for codecs.register for a list of the permitted
encoding error strings.

newline is a string controlling how universal newlines works (it only
applies to text mode). It can be None, '', '\n', '\r', and '\r\n'.  It works
as follows:

* On input, if newline is None, universal newlines mode is
  enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
  these are translated into '\n' before being returned to the
  caller. If it is '', universal newline mode is enabled, but line
  endings are returned to the caller untranslated. If it has any of
  the other legal values, input lines are only terminated by the given
  string, and the line ending is returned to the caller untranslated.

* On output, if newline is None, any '\n' characters written are
  translated to the system default line separator, os.linesep. If
  newline is '', no translation takes place. If newline is any of the
  other legal values, any '\n' characters written are translated to
  the given string.

closedfd is a bool. If closefd is False, the underlying file descriptor will
be kept open when the file is closed. This does not work when a file name is
given and must be True in that case.

The newly created file is non-inheritable.

A custom opener can be used by passing a callable as *opener*. The
underlying file descriptor for the file object is then obtained by calling
*opener* with (*file*, *flags*). *opener* must return an open file
descriptor (passing os.open as *opener* results in functionality similar to
passing None).

open() returns a file object whose type depends on the mode, and
through which the standard file operations such as reading and writing
are performed. When open() is used to open a file in a text mode ('w',
'r', 'wt', 'rt', etc.), it returns a TextIOWrapper. When used to open
a file in a binary mode, the returned class varies: in read binary
mode, it returns a BufferedReader; in write binary and append binary
modes, it returns a BufferedWriter, and in read/write mode, it returns
a BufferedRandom.

It is also possible to use a string or bytearray as a file for both
reading and writing. For strings StringIO can be used like a file
opened in a text mode, and for bytes a BytesIO can be used like a file
opened in a binary mode.
zinvalid file: %rzinvalid mode: %rzinvalid buffering: %rN�invalid encoding: %r�invalid errors: %rzaxrwb+t�x�r�w�a�+�t�bz'can't have text and binary mode at oncerz)can't have read/write/append mode at oncez/must have exactly one of read/write/append modez-binary mode doesn't take an encoding argumentz+binary mode doesn't take an errors argumentz+binary mode doesn't take a newline argumentrzaline buffering (buffering=1) isn't supported in binary mode, the default buffer size will be usedr�)�openerF���Tzinvalid buffering sizezcan't have unbuffered text I/Ozunknown mode: %r)�
isinstance�int�os�fspath�str�bytes�	TypeError�set�len�
ValueErrorrr�RuntimeWarning�FileIO�isatty�DEFAULT_BUFFER_SIZE�fstat�fileno�
st_blksize�OSError�AttributeError�BufferedRandom�BufferedWriter�BufferedReaderr�
TextIOWrapper�mode�close)�filerB�	bufferingr�errors�newline�closefdr)�modes�creating�reading�writing�	appending�updating�text�binaryr�raw�result�line_buffering�bs�buffers                      r�openrVIs���n�d�C� � ��y�y�����d�S�%��-�.�.��*�T�1�2�2��d�C� � ��*�T�1�2�2��i��%�%��/�)�;�<�<���J�x��$=�$=��.��9�:�:�
��*�V�S�"9�"9��,�v�5�6�6���I�E��s�9�~���T��S��Z�!7��+�d�2�3�3��e�|�H��U�l�G��U�l�G��u��I��e�|�H��%�<�D�
�E�\�F����B�C�C���G�#�i�/�!�3��D�E�E���7�i��J�K�K�
�(�&��H�I�I�
�&�$��F�G�G�
�'�%��F�G�G�
�)�q�.���
�
�C�$�a�	)����"�s�(�b��/�c�'�R�)��/�c�'�R�)��#��)�r�+��"�s�(�b�	*�
�
)�C��F�&�����>�Y��]�s�z�z�|�|��I�!�N��q�=�+�I�
#��X�X�c�j�j�l�+�6�6����6� "�I��q�=��5�6�6���>���
��=�>�>��#�C��3�F�
��I�#�C��3�F�
�#�C��3�F��/�$�6�7�7�����M� ��*���V�X�w��O�����	��
��5�^�,�
��
��6�����
�s=�3N8�;.N"�)'N8�A-N8�?"N8�"N5�2N8�4N5�5N8�8Oc�P�SSKnURS[S5 [US5$)a^Opens the provided file with mode ``'rb'``. This function
should be used when the intent is to treat the contents as
executable code.

``path`` should be an absolute path.

When supported by the runtime, this function can be hooked
in order to allow embedders more control over code files.
This functionality is not supported on the current runtime.
rNz(_pyio.open_code() may not be using hooksr�rb)rrr5rV)�pathrs  r�_open_code_with_warningrZs(����M�M�<� �!�%���d��rc��\rSrSrSrg)�UnsupportedOperationi4�N)�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r]rrr\r\4s��rr\c���\rSrSrSrSrSSjrSrSSjrSr	S	r
S
rSrSr
SS
jrSrSSjrSrSSjr\S5rSSjrSrSrSrSrS SjrSrSrSSjrSrSrg)!�IOBasei8a�The abstract base class for all I/O classes.

This class provides dummy implementations for many methods that
derived classes can override selectively; the default implementations
represent a file that cannot be read, written or seeked.

Even though IOBase does not declare read or write because
their signatures will vary, implementations and clients should
consider those methods part of the interface. Also, implementations
may raise UnsupportedOperation when operations they do not support are
called.

The basic type used for binary data read from or written to a file is
bytes. Other bytes-like objects are accepted as method arguments too.
Text I/O classes work with str data.

Note that calling any method (even inquiries) on a closed stream is
undefined. Implementations may raise OSError in this case.

IOBase (and its subclasses) support the iterator protocol, meaning
that an IOBase object can be iterated over yielding the lines in a
stream.

IOBase also supports the :keyword:`with` statement. In this example,
fp is closed after the suite of the with statement is complete:

with open('spam.txt', 'r') as fp:
    fp.write('Spam and eggs!')
c�P�[URR<SU<S35e)z@Internal: raise an OSError exception for unsupported operations.�.z() not supported)r\�	__class__r^)�self�names  r�_unsupported�IOBase._unsupportedZs&��"�$(�N�N�$;�$;�T�$C�D�	Drc�&�URS5 g)a�Change stream position.

Change the stream position to byte offset pos. Argument pos is
interpreted relative to the position indicated by whence.  Values
for whence are ints:

* 0 -- start of stream (the default); offset should be zero or positive
* 1 -- current stream position; offset may be negative
* 2 -- end of stream; offset is usually negative
Some operating systems / file systems could provide additional values.

Return an int indicating the new absolute position.
�seekN�rj�rh�pos�whences   rrm�IOBase.seekas��	
���&�!rc�&�URSS5$)z5Return an int indicating the current stream position.rr)rm�rhs r�tell�IOBase.tellqs���y�y��A��rNc�&�URS5 g)ztTruncate file to size bytes.

Size defaults to the current IO position as reported by tell().  Return
the new size.
�truncateNrn�rhrps  rrx�IOBase.truncateu���	
���*�%rc�$�UR5 g)zeFlush write buffers, if applicable.

This is not implemented for read-only and non-blocking streams.
N��_checkClosedrts r�flush�IOBase.flushs��
	
���rFc�p�UR(dUR5 SUlgg!SUlf=f)zYFlush and close the IO object.

This method has no effect if the file is already closed.
TN)�_IOBase__closedrrts rrC�IOBase.close�s0��
�}�}�
%��
�
�� $��
�	��!%��
�s�,�	5c�n�URnU(agUR5 g![a gf=f)zDestructor.  Calls close().N)�closedr=rC)rhr�s  r�__del__�IOBase.__del__�s9��	��[�[�F���	
�
�
����	�
�	�s�'�
4�4c��g)z�Return a bool indicating whether object supports random access.

If False, seek(), tell() and truncate() will raise OSError.
This method may need to do a test seek().
Fr]rts r�seekable�IOBase.seekable�s��rc�V�UR5(d[UcS5eU5eg)zEInternal: raise UnsupportedOperation if file is not seekable
        NzFile or stream is not seekable.)r�r\�rh�msgs  r�_checkSeekable�IOBase._checkSeekable��=���}�}���&�*-�+�(I�@�
@�;>�@�
@�rc��g)zfReturn a bool indicating whether object was opened for reading.

If False, read() will raise OSError.
Fr]rts r�readable�IOBase.readable����
rc�V�UR5(d[UcS5eU5eg)zEInternal: raise UnsupportedOperation if file is not readable
        NzFile or stream is not readable.)r�r\r�s  r�_checkReadable�IOBase._checkReadable�r�rc��g)zvReturn a bool indicating whether object was opened for writing.

If False, write() and truncate() will raise OSError.
Fr]rts r�writable�IOBase.writable�r�rc�V�UR5(d[UcS5eU5eg)zEInternal: raise UnsupportedOperation if file is not writable
        NzFile or stream is not writable.)r�r\r�s  r�_checkWritable�IOBase._checkWritable�r�rc��UR$)zuclosed: bool.  True iff the file has been closed.

For backwards compatibility, this is a property, not a predicate.
)r�rts rr��
IOBase.closed�s���}�}�rc�N�UR(a[UcS5eU5eg)z7Internal: raise a ValueError if file is closed
        N�I/O operation on closed file.�r�r4r�s  rr~�IOBase._checkClosed�s4���;�;�� #��=�6�
6�14�6�
6�rc�&�UR5 U$)zCContext management protocol.  Returns self (an instance of IOBase).r}rts r�	__enter__�IOBase.__enter__�s�������rc�$�UR5 g)z+Context management protocol.  Calls close()N)rC)rh�argss  r�__exit__�IOBase.__exit__�s���
�
�rc�&�URS5 g)z�Returns underlying file descriptor (an int) if one exists.

An OSError is raised if the IO object does not use a file descriptor.
r:Nrnrts rr:�
IOBase.fileno�s��
	
���(�#rc�$�UR5 g)zkReturn a bool indicating whether this is an 'interactive' stream.

Return False if it can't be determined.
Fr}rts rr7�
IOBase.isatty�s��
	
����rc�^^�[TS5(aUU4SjnOSnTcSmOTRnU"5m[	5nTS:d[U5T:aRTR
U"55nU(dO4XE-
nURS5(aOTS:aMA[U5T:aMR[U5$![a [T<S35ef=f)aRead and return a line of bytes from the stream.

If size is specified, at most size bytes will be read.
Size should be an int.

The line terminator is always b'\n' for binary files; for text
files, the newlines argument to open can be used to select the line
terminator(s) recognized.
�peekc�>�TRS5nU(dgURS5S-=(d [U5nTS:�a[UT5nU$)Nr�
r)r��findr3�min)�	readahead�nrh�sizes  ��r�
nreadahead�#IOBase.readline.<locals>.nreadaheadsI��� �I�I�a�L�	� ���^�^�E�*�Q�.�A�3�y�>���1�9��A�t��A��rc��g�Nrr]r]rrr�r�s��rr*� is not an integerrr�)	�hasattr�	__index__r=r1�	bytearrayr3�read�endswithr0)rhr�r��
size_index�resr's``    r�readline�IOBase.readlines�����4�� � �
�
��<��D�
$�!�^�^�
�"�|���k���Q�h�#�c�(�T�/��	�	�*�,�'�A����H�C��|�|�E�"�"��
�Q�h�#�c�(�T�/��S�z���"�
?��4�(�*<� =�>�>�
?�s�B5�5Cc�&�UR5 U$�Nr}rts r�__iter__�IOBase.__iter__*s�������rc�@�UR5nU(d[eU$r�)r��
StopIteration�rh�lines  r�__next__�IOBase.__next__.s���}�}�������rc��UbUS::a[U5$Sn/nUH*nURU5 U[U5-
nX!:�dM) U$ U$)z�Return a list of lines from the stream.

hint can be specified to control the number of lines read: no more
lines will be read if the total size (in bytes/characters) of all
lines so far exceeds hint.
r)�list�appendr3)rh�hintr��linesr�s     r�	readlines�IOBase.readlines4sZ���<�4�1�9���:��
�����D��L�L���
��T��N�A��y�����
�rc�X�UR5 UHnURU5 M g)z�Write a list of lines to the stream.

Line separators are not added, so it is usual for each of the lines
provided to have a line separator at the end.
N)r~�write)rhr�r�s   r�
writelines�IOBase.writelinesFs&��	
�����D��J�J�t��r)�__closed�rr��r*) r^r_r`ra�__doc__rjrmrurxrr�rCr�r�r�r�r�r�r��propertyr�r~r�r�r:r7r�r�r�r�r�rbr]rrrdrd8s����@D�"� �&���H�	%��$�@��@��@�����6��
�$��(�T���$rrd)�	metaclassc�4�\rSrSrSrS	SjrSrSrSrSr	g)
�	RawIOBaseiSzBase class for raw binary I/O.c��UcSnUS:aUR5$[UR55nURU5nUcgX#S2	[	U5$)z�Read and return up to size bytes, where size is an int.

Returns an empty bytes object on EOF, or None if the object is
set not to block and has no data to read.
Nr*r)�readallr�r��readintor0)rhr�r'r�s    rr��RawIOBase.readasX���<��D��!�8��<�<�>�!��d�n�n�&�'���M�M�!����9��
�b�E��Q�x�rc��[5nUR[5=n(a"X-
nUR[5=n(aM"U(a[U5$U$)z+Read until EOF, using multiple read() call.)r�r�r8r0)rhr��datas   rr��RawIOBase.readallrsP���k���i�i� 3�4�4�d�4��K�C��i�i� 3�4�4�d�4����:���Krc�&�URS5 g)z�Read bytes into a pre-allocated bytes-like object b.

Returns an int representing the number of bytes read (0 for EOF), or
None if the object is set not to block and has no data to read.
r�Nrn�rhr's  rr��RawIOBase.readinto}r{rc�&�URS5 g)z�Write the given buffer to the IO stream.

Returns the number of bytes written, which may be less than the
length of b in bytes.
r�Nrnr�s  rr��RawIOBase.write�s��	
���'�"rr]Nr�)
r^r_r`rar�r�r�r�r�rbr]rrr�r�Ss��(��"	�&�#rr�)r6c�J�\rSrSrSrSSjrSSjrSrSrSr	Sr
S	rS
rg)
�BufferedIOBasei�a�Base class for buffered IO objects.

The main difference with RawIOBase is that the read() method
supports omitting the size argument, and does not have a default
implementation that defers to readinto().

In addition, read(), readinto() and write() may raise
BlockingIOError if the underlying raw stream is in non-blocking
mode and not ready; unlike their raw counterparts, they will never
return None.

A typical implementation should not inherit from a RawIOBase
implementation, but wrap one.
c�&�URS5 g)aDRead and return up to size bytes, where size is an int.

If the argument is omitted, None, or negative, reads and
returns all data until EOF.

If the argument is positive, and the underlying raw stream is
not 'interactive', multiple raw reads may be issued to satisfy
the byte count (unless EOF is reached first).  But for
interactive raw streams (XXX and for pipes?), at most one raw
read will be issued, and a short result does not imply that
EOF is imminent.

Returns an empty bytes array on EOF.

Raises BlockingIOError if the underlying raw stream has no
data at the moment.
r�Nrn�rhr�s  rr��BufferedIOBase.read�s��$	
���&�!rc�&�URS5 g)zQRead up to size bytes with at most one read() system call,
where size is an int.
�read1Nrnr�s  rr��BufferedIOBase.read1�s��	
���'�"rc�"�URUSS9$)a6Read bytes into a pre-allocated bytes-like object b.

Like read(), this may issue multiple reads to the underlying raw
stream, unless the latter is 'interactive'.

Returns an int representing the number of bytes read (0 for EOF).

Raises BlockingIOError if the underlying raw stream has no
data at the moment.
F�r���	_readintor�s  rr��BufferedIOBase.readinto�s���~�~�a�u�~�-�-rc�"�URUSS9$)z�Read bytes into buffer *b*, using at most one system call

Returns an int representing the number of bytes read (0 for EOF).

Raises BlockingIOError if the underlying raw stream has no
data at the moment.
Tr�r�r�s  r�	readinto1�BufferedIOBase.readinto1�s���~�~�a�t�~�,�,rc��[U[5(d[U5nURS5nU(aUR[	U55nOUR[	U55n[	U5nX1SU&U$)N�B)r+�
memoryview�castr�r3r�)rhr'r�r�r�s     rr��BufferedIOBase._readinto�sc���!�Z�(�(��1�
�A�
�F�F�3�K����:�:�c�!�f�%�D��9�9�S��V�$�D���I���"�1���rc�&�URS5 g)z�Write the given bytes buffer to the IO stream.

Return the number of bytes written, which is always the length of b
in bytes.

Raises BlockingIOError if the buffer is full and the
underlying raw stream cannot accept more data at the moment.
r�Nrnr�s  rr��BufferedIOBase.write�s��	
���'�"rc�&�URS5 g)z�
Separate the underlying raw stream from the buffer and return it.

After the raw stream has been detached, the buffer is in an unusable
state.
�detachNrnrts rr�BufferedIOBase.detach����	
���(�#rr]Nr�)
r^r_r`rar�r�r�r�r�r�r�rrbr]rrr�r��s*��
�"�(#�.�	-�
�	#�$rr�c��\rSrSrSrSrSSjrSrSSjrSr	S	r
S
rSr\
S5r\
S
5r\
S5r\
S5rSrSrSrSrSrg)�_BufferedIOMixini�z�A mixin implementation of BufferedIOBase with an underlying raw stream.

This passes most requests on to the underlying raw stream.  It
does *not* provide implementations of read(), readinto() or
write().
c��Xlgr���_raw�rhrQs  r�__init__�_BufferedIOMixin.__init__s���	rc�^�URRX5nUS:a[S5eU$)Nrz#seek() returned an invalid position)rQrmr<)rhrprq�new_positions    rrm�_BufferedIOMixin.seek
s.���x�x�}�}�S�1���!���?�@�@��rc�\�URR5nUS:a[S5eU$)Nrz#tell() returned an invalid position)rQrur<rys  rru�_BufferedIOMixin.tells)���h�h�m�m�o����7��?�@�@��
rNc��UR5 UR5 UR5 UcUR5nURRU5$r�)r~r�rrurQrxrys  rrx�_BufferedIOMixin.truncatesL����������
	
�
�
���;��)�)�+�C��x�x� � ��%�%rc�p�UR(a[S5eURR5 g)N�flush on closed file)r�r4rQrrts rr�_BufferedIOMixin.flush's#���;�;��3�4�4������rc���URb>UR(d,UR5 URR5 ggg!URR5 f=fr�)rQr�rrCrts rrC�_BufferedIOMixin.close,sH���8�8�����
!��
�
������� �)4���
����� ���A
�
A)c�|�URc[S5eUR5 URnSUlU$)Nzraw stream already detached)rQr4rrrs  rr�_BufferedIOMixin.detach4s6���8�8���:�;�;��
�
���i�i����	��
rc�6�URR5$r�)rQr�rts rr��_BufferedIOMixin.seekable>����x�x� � �"�"rc��UR$r�r
rts rrQ�_BufferedIOMixin.rawAs���y�y�rc�.�URR$r�)rQr�rts rr��_BufferedIOMixin.closedEs���x�x���rc�.�URR$r�)rQrirts rri�_BufferedIOMixin.nameI����x�x�}�}�rc�.�URR$r�)rQrBrts rrB�_BufferedIOMixin.modeMr*rc�J�[SURR<S35e�Nzcannot pickle z object�r1rgr^rts r�__getstate__�_BufferedIOMixin.__getstate__Q�!���.����)@�)@�(C�7�K�L�Lrc���URRnURRnURnSR	XU5$![
a SR	X5s$f=f)Nz<{}.{} name={!r}>z<{}.{}>)rgr_r`ri�formatr=)rh�modname�clsnameris    r�__repr__�_BufferedIOMixin.__repr__Tsf���.�.�+�+���.�.�-�-��	F��9�9�D�'�-�-�g��E�E���	6��#�#�G�5�5�	6�s�A�A*�)A*c�6�URR5$r�)rQr:rts rr:�_BufferedIOMixin.fileno`����x�x��� � rc�6�URR5$r�)rQr7rts rr7�_BufferedIOMixin.isattycr;rr
r�r�)r^r_r`rar�rrmrurxrrCrr�r�rQr�rirBr0r7r:r7rbr]rrrr�s�����
��
&�"�
!��#�����������������M�F�!�!rrc�^�\rSrSrSrSrSSjrSrSrSr	U4Sjr
SS	jrSS
jrSr
SSjrS
rSSjrSrSrSrSrU=r$)�BytesIOigz<Buffered I/O implementation using an in-memory bytes buffer.Nc�@�[5nUbX!-
nX lSUlg�Nr)r��_buffer�_pos)rh�
initial_bytes�bufs   rr�BytesIO.__init__os#���k���$�� �C�����	rc�n�UR(a[S5eURR5$)Nz__getstate__ on closed file)r�r4�__dict__�copyrts rr0�BytesIO.__getstate__vs(���;�;��:�;�;��}�}�!�!�#�#rc�d�UR(a[S5e[UR5$)z8Return the bytes value (contents) of the buffer
        zgetvalue on closed file)r�r4r0rBrts r�getvalue�BytesIO.getvalue{s&���;�;��6�7�7��T�\�\�"�"rc�d�UR(a[S5e[UR5$)z;Return a readable and writable view of the buffer.
        zgetbuffer on closed file)r�r4rrBrts r�	getbuffer�BytesIO.getbuffer�s&���;�;��7�8�8��$�,�,�'�'rc�p>�URbURR5 [TU]
5 gr�)rB�clear�superrC�rhrgs �rrC�
BytesIO.close�s&����<�<�#��L�L��� �
��
�rc���UR(a[S5eUcSnOURnU"5nUS:a[UR5n[UR5UR::ag[[UR5URU-5nURURUnX0l[U5$![a [	U<S35ef=f)N�read from closed filer*r�rr)
r�r4r�r=r1r3rBrCr�r0)rhr�r��newposr's     rr��BytesIO.read�s����;�;��4�5�5��<��D�
$�!�^�^�
�"�|���!�8��t�|�|�$�D��t�|�|���	�	�)���S����&��	�	�D�(8�9���L�L����V�,���	��Q�x���"�
?��4�(�*<� =�>�>�
?�s�C�C&c�$�URU5$)z"This is the same as read.
        )r�r�s  rr��
BytesIO.read1�s���y�y���rc���UR(a[S5e[U[5(a[	S5e[U5nURnSSS5 WS:XagURnU[UR5:�a0SU[UR5-
-nU=RU-
sl	XRXDU-&U=RU-
slU$!,(df   N�=f)N�write to closed file� can't write str to binary streamr�)
r�r4r+r/r1r�nbytesrCr3rB)rhr'�viewr�rp�paddings      rr��
BytesIO.write�s����;�;��3�4�4��a�����>�?�?�
��]�d����A����6���i�i����T�\�\�"�"���s�4�<�<�'8�!8�9�G��L�L�G�#�L�$%���S�q��!��	�	�Q��	����]�s�
C � 
C.c���UR(a[S5eURnU"5nUS:Xa'US:a[SU<35eXlUR
$US:Xa*[
SUR
U-5UlUR
$US:Xa3[
S[UR5U-5UlUR
$[S5e![a [	U<S35ef=f)Nzseek on closed filer�r�negative seek position rrzunsupported whence value)	r�r4r�r=r1rC�maxr3rB)rhrprq�	pos_indexs    rrm�BytesIO.seek�s����;�;��2�3�3�	��
�
�I��+�C��Q�;��Q�w� ��!E�F�F��I��y�y��
�q�[��A�t�y�y�3��/�D�I�
�y�y��	�q�[��A�s�4�<�<�0�3�6�7�D�I��y�y���7�8�8���	:��s�g�%7�8�9�9�	:�s�C�C,c�R�UR(a[S5eUR$)N�tell on closed file)r�r4rCrts rru�BytesIO.tell�s���;�;��2�3�3��y�y�rc��UR(a[S5eUc
URnO)URnU"5nUS:a[SU<35eURUS2	U$![a [U<S35ef=f)Nztruncate on closed filer�rznegative truncate position )r�r4rCr�r=r1rB)rhrprgs   rrx�BytesIO.truncate�s����;�;��6�7�7��;��)�)�C�
"��M�M�	� �k���Q�w� �C�!I�J�J��L�L�����
��"�
>��3�'�);� <�=�=�
>�s�A'�'Bc�<�UR(a[S5eg�Nr�Tr�rts rr��BytesIO.readable�����;�;��<�=�=�rc�<�UR(a[S5egror�rts rr��BytesIO.writable�rqrc�<�UR(a[S5egror�rts rr��BytesIO.seekable�rqr)rBrCr�r�r�)r^r_r`rar�rBrr0rLrOrCr�r�r�rmrurxr�r�r�rb�
__classcell__�rgs@rr?r?gsX���F��G��$�
#�(��
�*�
�&�*�
�"�
�
�rr?c�x�\rSrSrSr\4SjrSrSrSSjr	SSjr
SS	jrSS
jrSSjr
SrS
rSSjrSrg)r@i�z�BufferedReader(raw[, buffer_size])

A buffer for a readable, sequential BaseRawIO object.

The constructor creates a BufferedReader for the given readable raw
stream and buffer_size. If buffer_size is omitted, DEFAULT_BUFFER_SIZE
is used.
c���UR5(d[S5e[RX5 US::a[	S5eX lUR
5 [5Ulg)zMCreate a new buffered reader using the given readable raw IO object.
        z "raw" argument must be readable.r�invalid buffer sizeN)	r�r<rrr4�buffer_size�_reset_read_buf�Lock�
_read_lock�rhrQr{s   rr�BufferedReader.__init__sX���|�|�~�~��<�=�=��!�!�$�,��!���2�3�3�&�������&��rc�6�URR5$r�)rQr�rts rr��BufferedReader.readabler#rc� �SUlSUlg)Nrr)�	_read_buf�	_read_posrts rr|�BufferedReader._reset_read_bufs�������rNc��UbUS:a[S5eUR URU5sSSS5 $!,(df   g=f)z�Read size bytes.

Returns exactly size bytes of data unless the underlying raw IO
stream reaches EOF or if the call would block in non-blocking
mode. If size is negative, read until EOF or until read() would
block.
Nr*zinvalid number of bytes to read)r4r~�_read_unlockedr�s  rr��BufferedReader.reads;�����r�	��>�?�?�
�_�_��&�&�t�,��_�_�s	�<�
A
c�p�SnSnURnURnUbUS:Xa�UR5 [URS5(a1URR5nUc
XES=(d S$XESU-$XES/nSnURR
5nXc;aUnO!U[U5-
nURU5 MCSRU5=(d U$[U5U-
n	X::aU=RU-
slXEXQ-$XES/n[URU5n
X�:aIURR
U
5nXc;aUnO&U	[U5-
n	URU5 X�:aMI[X5nSRU5nX�SUlSUlU(aUSU$U$)Nr)rNr*r�r)
r�r�r|r�rQr�r�r3r��joinrfr{r�)rhr��
nodata_val�empty_valuesrErp�chunk�chunks�current_size�avail�wanted�outs            rr��BufferedReader._read_unlocked"s����
�"���n�n���n�n��
�9��R��� � �"��t�x�x��+�+����(�(�*���=��t�9�,��,��t�9�u�,�,��$�i�[�F��L�����
�
����(�!&�J����E�
�*���
�
�e�$���8�8�F�#�1�z�1��C��3����:��N�N�a��N��3�5�>�!��d�)����T�%�%�q�)���i��H�H�M�M�&�)�E��$�"�
���S��Z��E��M�M�%� �
�i�
��M���h�h�v����R��������s�2�A�w�-�:�-rc��URS5 UR URU5sSSS5 $!,(df   g=f)z�Returns buffered bytes without advancing the position.

The argument indicates a desired minimal number of bytes; we
do at most one raw read to satisfy it.  We never return more
than self.buffer_size.
zpeek of closed fileN)r~r~�_peek_unlockedr�s  rr��BufferedReader.peekVs2��	
���/�0�
�_�_��&�&�t�,��_�_�s	�9�
Ac�j�[XR5n[UR5UR-
nX2:dUS::aYURU-
nUR
R
U5nU(a(URURSU-UlSUlURURS$rA)r�r{r3r�r�rQr�)rhr��want�have�to_read�currents      rr��BufferedReader._peek_unlockedas����1�&�&�'���4�>�>�"�T�^�^�3���;�$�!�)��&�&��-�G��h�h�m�m�G�,�G��!%�������!@�7�!J���!"����~�~�d�n�n�o�.�.rc	�<�URS5 US:aURnUS:XagUR URS5 UR	[U[
UR5UR-
55sSSS5 $!,(df   g=f)z<Reads up to size bytes, with at most one read() system call.zread of closed filerrrN)	r~r{r~r�r�r�r3r�r�r�s  rr��BufferedReader.read1lsy��	
���/�0��!�8��#�#�D��1�9��
�_�_�����"��&�&��D�#�d�n�n�-����>�?�A��_�_�s�AB
�
Bc�T�URS5 [U[5(d[U5nURS:XagUR	S5nSnUR
 U[
U5:Ga[[
UR5UR-
[
U55nU(aSURURURU-XX4-&U=RU-
sl	X4-
nU[
U5:XaO�[
U5U-
UR:�a*URRXS5nU(dOKX5-
nO%U(aU(dURS5(dO!U(aU(aOU[
U5:aGMSSS5 U$!,(df   U$=f)z2Read data into *buf* with at most one system call.zreadinto of closed filerrNr)r~r+rr`rr~r3r�r�r�r{rQr�r�)rhrEr��writtenr�r�s      rr��BufferedReader._readintos]��	
���3�4�
�#�z�*�*��S�/�C��:�:��?���h�h�s�m����
�_�_��C��H�$��C����/�$�.�.�@�#�c�(�K������t�~�~�d�n�n�U�6J�K���
�.��N�N�e�+�N��$�G��#�c�(�*���s�8�g�%��(8�(8�8����)�)�#�h�-�8�A����L�G� �G��.�.�q�1�1���W��9�C��H�$��>��?�_�>��s
�"D)F�
F'c��[[RU5[UR5-
UR
-S5$rA)rfrrur3r�r�rts rru�BufferedReader.tell�s3���#�(�(��.��T�^�^�1D�D�t�~�~�U�WX�Y�Yrc�B�U[;a[S5eURS5 UR US:Xa%U[	UR
5UR-
-n[RXU5nUR5 UsSSS5 $!,(df   g=f)N�invalid whence valuezseek of closed filer)
�valid_seek_flagsr4r~r~r3r�r�rrmr|ros   rrm�BufferedReader.seek�s{���)�)��3�4�4����/�0�
�_�_���{��s�4�>�>�*�T�^�^�;�;��"�'�'��6�:�C�� � �"���_�_�s�AB�
B)r�r~r�r{r�r�r�)r^r_r`rar�r8rr�r|r�r�r�r�r�r�rurmrbr]rrr@r@�sG���)<�!�#��-�2.�h	-�	/�A�&.�`Z�	rr@c�\�\rSrSrSr\4SjrSrSrSSjr	Sr
S	rS
rSSjr
SrS
rg)r?i�z�A buffer for a writeable sequential RawIO object.

The constructor creates a BufferedWriter for the given writeable raw
stream. If the buffer_size is not given, it defaults to
DEFAULT_BUFFER_SIZE.
c���UR5(d[S5e[RX5 US::a[	S5eX l[
5Ul[5Ul	g)Nz "raw" argument must be writable.rrz)
r�r<rrr4r{r��
_write_bufr}�_write_lockrs   rr�BufferedWriter.__init__�sT���|�|�~�~��<�=�=��!�!�$�,��!���2�3�3�&��#�+����6��rc�6�URR5$r�)rQr�rts rr��BufferedWriter.writable�r#rc�h�[U[5(a[S5eUR UR(a[S5e[
UR5UR:�aUR5 [
UR5nURRU5 [
UR5U-
n[
UR5UR:�aUR5 UsSSS5 $![a�n[
UR5UR:�ae[
UR5UR-
nX5-nURSURUl[URURU5eSnAN�SnAff=f!,(df   g=f)Nr^r])r+r/r1r�r�r4r3r�r{�_flush_unlocked�extend�BlockingIOError�errno�strerror)rhr'�beforer��e�overages      rr��BufferedWriter.write�sS���a�����>�?�?�
�
�
��{�{� �!7�8�8��4�?�?�#�d�&6�&6�6��$�$�&�����)�F��O�O�"�"�1�%��$�/�/�*�V�3�G��4�?�?�#�d�&6�&6�6�	L��(�(�*��/�
��'�L��4�?�?�+�d�.>�.>�>�#&�d�o�o�"6��9I�9I�"I���*��*.�/�/�:K�4�;K�;K�*L���-�a�g�g�q�z�z�7�K�K�
?��L���
�s7�B;F#�)D�9F#�
F �BF�F#�F � F#�#
F1Nc���UR UR5 UcURR5nURR	U5sSSS5 $!,(df   g=fr�)r�r�rQrurxrys  rrx�BufferedWriter.truncate�sI��
�
�
�� � �"��{��h�h�m�m�o���8�8�$�$�S�)�	�
�
�s�AA�
A-c�p�UR UR5 SSS5 g!,(df   g=fr�)r�r�rts rr�BufferedWriter.flush�s#��
�
�
�� � �"��
�
�s�'�
5c��UR(a[S5eUR(a�URR	UR5nUc[[RSS5eU[UR5:�dUS:a[S5eURSU2	UR(aM�gg![
a [
S5ef=f)NrzHself.raw should implement RawIOBase: it should not raise BlockingIOErrorz)write could not complete without blockingrz*write() returned incorrect number of bytes)r�r4r�rQr�r��RuntimeErrorr��EAGAINr3r<�rhr�s  rr��BufferedWriter._flush_unlocked�s����;�;��3�4�4��o�o�
G��H�H�N�N�4�?�?�3���y�%��L�L�?��D�D��3�t���'�'�1�q�5��J�K�K�������#��o�o�o��#�
G�"�$F�G�G�
G�s�%C�Cc�X�[RU5[UR5-$r�)rrur3r�rts rru�BufferedWriter.tell
s!���$�$�T�*�S����-A�A�Arc���U[;a[S5eUR UR5 [RXU5sSSS5 $!,(df   g=f)Nr�)r�r4r�r�rrmros   rrm�BufferedWriter.seeksH���)�)��3�4�4�
�
�
�� � �"�#�(�(��F�;��
�
�s�&A�
A c���UR URbUR(a
SSS5 gSSS5 UR5 UR URR	5 SSS5 g!,(df   NO=f!,(df   g=f!UR URR	5 SSS5 f!,(df   f=f=fr�)r�rQr�rrCrts rrC�BufferedWriter.closes���
�
�
��x�x��4�;�;���
�#.��	!��J�J�L��!�!������ �"�!��
��"�!���!�!������ �"�!�!�s;� B�B"�B�
B�
B�"
C$�/C�
	C$�
C!�C$)r�r�r{r�r�)r^r_r`rar�r8rr�r�rxrr�rurmrCrbr]rrr?r?�s:���)<�	"�#��8*�#�$�"B�<�
!rr?c��\rSrSrSr\4SjrSSjrSrSr	SSjr
SSjrS	rS
r
SrSrS
rSr\S5rSrg)�BufferedRWPairi'awA buffered reader and writer object together.

A buffered reader object and buffered writer object put together to
form a sequential IO object that can read and write. This is typically
used with a socket or two-way pipe.

reader and writer are RawIOBase objects that are readable and
writeable respectively. If the buffer_size is omitted it defaults to
DEFAULT_BUFFER_SIZE.
c���UR5(d[S5eUR5(d[S5e[X5Ul[X#5Ulg)z5Constructor.

The arguments are two RawIO instances.
z#"reader" argument must be readable.z#"writer" argument must be writable.N)r�r<r�r@�readerr?�writer)rhr�r�r{s    rr�BufferedRWPair.__init__7sN��
��� � ��?�@�@���� � ��?�@�@�$�V�9���$�V�9��rc�B�UcSnURRU5$�Nr*)r�r�r�s  rr��BufferedRWPair.readEs!���<��D��{�{����%�%rc�8�URRU5$r�)r�r�r�s  rr��BufferedRWPair.readintoJs���{�{�#�#�A�&�&rc�8�URRU5$r�)r�r�r�s  rr��BufferedRWPair.writeMs���{�{� � ��#�#rc�8�URRU5$r�)r�r�r�s  rr��BufferedRWPair.peekPs���{�{����%�%rc�8�URRU5$r�)r�r�r�s  rr��BufferedRWPair.read1Ss���{�{� � ��&�&rc�8�URRU5$r�)r�r�r�s  rr��BufferedRWPair.readinto1Vs���{�{�$�$�Q�'�'rc�6�URR5$r�)r�r�rts rr��BufferedRWPair.readableY����{�{�#�#�%�%rc�6�URR5$r�)r�r�rts rr��BufferedRWPair.writable\r�rc�6�URR5$r�)r�rrts rr�BufferedRWPair.flush_s���{�{� � �"�"rc��URR5 URR5 g!URR5 f=fr�)r�rCr�rts rrC�BufferedRWPair.closebs8��	 ��K�K�����K�K�����D�K�K����s	�7�Ac�x�URR5=(d URR5$r�)r�r7r�rts rr7�BufferedRWPair.isattyhs'���{�{�!�!�#�;�t�{�{�'9�'9�';�;rc�.�URR$r�)r�r�rts rr��BufferedRWPair.closedk����{�{�!�!�!r)r�r�Nr�r�)r^r_r`rar�r8rr�r�r�r�r�r�r�r�rrCr7r�r�rbr]rrr�r�'s]��	�4G�:�&�
'�$�&�'�(�&�&�#� �<��"��"rr�c�n�\rSrSrSr\4SjrSSjrSrSSjr	SSjr
S	rSS
jrSSjr
SrS
rSrg)r>ipz�A buffered interface to random access streams.

The constructor creates a reader and writer for a seekable stream,
raw, given in the first argument. If the buffer_size is omitted it
defaults to DEFAULT_BUFFER_SIZE.
c�|�UR5 [RXU5 [RXU5 gr�)r�r@rr?rs   rr�BufferedRandom.__init__ys.����������;�7�����;�7rc��U[;a[S5eUR5 UR(aQUR UR
R
UR[UR5-
S5 SSS5 UR
R
X5nUR UR5 SSS5 US:a[S5eU$!,(df   Na=f!,(df   N2=f)Nr�rrz seek() returned invalid position)r�r4rr�r~rQrmr�r3r|r<ros   rrm�BufferedRandom.seek~s����)�)��3�4�4��
�
���>�>�������
�
�d�n�n�s�4�>�>�/B�B�A�F�!��h�h�m�m�C�(��
�_�_�� � �"����7��<�=�=��
�!���
�_�s�=C�/C,�
C)�,
C:c�x�UR(a[RU5$[RU5$r�)r�r?rur@rts rru�BufferedRandom.tell�s+���?�?�!�&�&�t�,�,�!�&�&�t�,�,rNc�R�UcUR5n[RX5$r�)rur?rxrys  rrx�BufferedRandom.truncate�s#���;��)�)�+�C��&�&�t�1�1rc�V�UcSnUR5 [RX5$r�)rr@r�r�s  rr��BufferedRandom.read�s&���<��D��
�
���"�"�4�.�.rc�L�UR5 [RX5$r�)rr@r�r�s  rr��BufferedRandom.readinto�s���
�
���&�&�t�/�/rc�L�UR5 [RX5$r�)rr@r�r�s  rr��BufferedRandom.peek�s���
�
���"�"�4�.�.rc�L�UR5 [RX5$r�)rr@r�r�s  rr��BufferedRandom.read1�s���
�
���#�#�D�/�/rc�L�UR5 [RX5$r�)rr@r�r�s  rr��BufferedRandom.readinto1�s���
�
���'�'��0�0rc�2�UR(aaUR URRUR[UR5-
S5 UR
5 SSS5 [RX5$!,(df   N#=fr�)	r�r~rQrmr�r3r|r?r�r�s  rr��BufferedRandom.write�s`���>�>�������
�
�d�n�n�s�4�>�>�/B�B�A�F��$�$�&�!��#�#�D�,�,�!��s�A
B�
Br]r�r�r�)r^r_r`rar�r8rrmrurxr�r�r�r�r�r�rbr]rrr>r>ps>���)<�8�
�"-�2�/�0�/�0�1�-rr>c��^�\rSrSrSrSrSrSrSrSr	Sr
SSjrSrSr
S	rS
rSSjrSSjrS
rSrSr\4SjrSrSSjrU4SjrSrSrSrSrSr\S5r \S5r!Sr"U=r#$)r6i�r*FNTc�	�URS:�a9UR(a [R"UR5 SUl[	U[
5(a[
S5e[	U[5(aM[	U[5(a$SSK	nURS[SS9 [U5nUnUS:a[S5eOSn[	U[5(d[
S	U<35e[U5[S
5::d[S	U<35e[SU55S:wdUR!S
5S:�a[S5eSU;a0SUlSUl[R&[R(-nOtSU;a
SUlSnOdSU;a)SUl[R([R,-nO5SU;a/SUlSUl[R0[R(-nS
U;aSUlSUlUR*(a%UR$(aW[R2-nO8UR*(aW[R4-nOW[R6-nU[9[SS5-n[9[SS5=(d [9[SS5nXx-nSn	US:a�U(d[S5eUc[R:"XS5nO9U"X5n[	U[5(d[
S5eUS:a[=S5eUn	U(d[R>"US5 X0l[R@"U5n
[BRD"U
RF5(a=[I[JRL[RN"[JRL5U5e[9U
SS5Ul)URRS::a[TUl)[V(a[WU[RX5 Xl-UR.(a[R\"US[^5 OX`lg!SUlf=f![Pa N�f=f![<a)nURJ[JR`:waeSnANQSnAff=f! U	b[R"U	5 e=f)aOpen a file.  The mode can be 'r' (default), 'w', 'x' or 'a' for reading,
writing, exclusive creation or appending.  The file will be created if it
doesn't exist when opened for writing or appending; it will be truncated
when opened for writing.  A FileExistsError will be raised if it already
exists when opened for creating. Opening a file for creating implies
writing so this mode behaves in a similar way to 'w'. Add a '+' to the mode
to allow simultaneous reading and writing. A custom opener can be used by
passing a callable as *opener*. The underlying file descriptor for the file
object is then obtained by calling opener with (*name*, *flags*).
*opener* must return an open file descriptor (passing os.open as *opener*
results in functionality similar to passing None).
rr*z$integer argument expected, got floatNz!bool is used as a file descriptorr)rznegative file descriptorzinvalid mode: zxrwab+c3�*# �UH	oS;v� M g7f)�rwaxNr])�.0�cs  r�	<genexpr>�"FileIO.__init__.<locals>.<genexpr>�s���)�D�q�F�{�D�s�rr%zKMust have exactly one of create/read/write/append mode and at most one plusr!Tr"r#r$�O_BINARY�O_NOINHERIT�	O_CLOEXECz'Cannot use closefd=False with file namei�zexpected integer from openerzNegative file descriptorFr;)1�_fd�_closefdr-rCr+�floatr1r,�boolrrr5r4r/r2�sum�count�_created�	_writable�O_EXCL�O_CREAT�	_readable�O_TRUNC�
_appending�O_APPEND�O_RDWR�O_RDONLY�O_WRONLY�getattrrVr<�set_inheritabler9�stat�S_ISDIR�st_mode�IsADirectoryErrorr��EISDIRr�r=�_blksizer8�_setmoderri�lseekr
�ESPIPE)rhrDrBrHr)r�fdr�noinherit_flag�owned_fd�fdfstatr�s            rr�FileIO.__init__�s����8�8�q�=�
��=�=��H�H�T�X�X�&�����d�E�"�"��B�C�C��d�C� � ��$��%�%���
�
�A�,���<��4�y���B��A�v� �!;�<�<���B��$��$�$��$�8�9�9��4�y�C��M�)��4�9�:�:��)�D�)�)�Q�.�$�*�*�S�/�A�2E��9�:�
:��$�;� �D�M�!�D�N��I�I��
�
�*�E�
�D�[�!�D�N��E�
�D�[�!�D�N��J�J����+�E�
�D�[�!�D�N�"�D�O��K�K�"�*�*�,�E��$�;�!�D�N�!�D�N��>�>�d�n�n��R�Y�Y��E�
�^�^��R�[�[� �E��R�[�[� �E�
���Z��+�+��!�"�m�Q�7�6�!�"�k�1�5�	�
�����/	��A�v��$�%N�O�O��>�����e�4�B���,�B�%�b�#�.�.�'�(F�G�G��A�v�%�&@�A�A���%��&�&�r�5�1�#�M��h�h�r�l�G�
��<�<����0�0�+�E�L�L�,.�K�K����,E�t�M�M�1�$�G�\�1�=�D�M��}�}��!� 3��
��x���R�[�[�)��I������H�H�R��H�-�����S����^"�
��
��&���w�w�%�,�,�.��/����	��#�����"��sb�1Q�?B(R,�(A"Q&�
A*R,�5Q6�	Q#�&
Q3�0R,�2Q3�3R,�6
R)�R$�R,�$R)�)R,�,Sc���URS:�aSUR(aAUR(d/SSKnUR	SU<3[
SUS9 UR
5 gggg)Nrzunclosed file r)r�source)r
rr�rr�ResourceWarningrC)rhrs  rr��FileIO.__del__AsK���8�8�q�=�T�]�]�4�;�;���M�M��6��%&�t�
�
5��J�J�L�	4?�]�=rc�J�[SURR<S35er.r/rts rr0�FileIO.__getstate__Hr2rc	�d�URR<SURR<3nUR(aSU-$URnSU<SU<SUR
<SUR<S3	$![a) SXRUR
UR4-s$f=f)	Nrfz
<%s [closed]>�<z name=z mode=z	 closefd=�>z<%s fd=%d mode=%r closefd=%r>)	rgr_r`r�rirBrr=r
)rh�
class_nameris   rr7�FileIO.__repr__Ks��� $��� 9� 9� $��� ;� ;�=�
��;�;�"�Z�/�/�	B��9�9�D� ��t�y�y�$�-�-�A�
B��	�	F�3����4�9�9�d�m�m�D�E�
F�	F�s�	A<�<0B/�.B/c�<�UR(d[S5eg)NzFile not open for reading)rr\rts rr��FileIO._checkReadableY����~�~�&�'B�C�C�rc�<�UR(d[S5eg)NzFile not open for writing)rr\r�s  rr��FileIO._checkWritable]r8rc���UR5 UR5 UbUS:aUR5$[R"UR
U5$![a gf=f)z�Read at most size bytes, returned as bytes.

Only makes one system call, so less data may be returned than requested
In non-blocking mode, returns None if no data is available.
Return an empty bytes object at EOF.
Nr)r~r�r�r-r�r
r�r�s  rr��FileIO.readas_��	
���������<�4�!�8��<�<�>�!�	��7�7�4�8�8�T�*�*���	��	�s� A�
A)�(A)c�^�UR5 UR5 [n[R"UR
S[5n[R"UR
5RnX2:�aX2-
S-n[5n[U5U:�a[U5nU[U[5-
nU[U5-
n[R"UR
U5nU(dOXF-
nMk[U5$![a N�f=f![a
 U(aM/gf=f)z�Read all data from the file, returned as bytes.

In non-blocking mode, returns as much as is immediately available,
or None if no data is available.  Return an empty bytes object at EOF.
rrN)r~r�r8r-r$r
r	r9�st_sizer<r�r3rfr�r�r0)rh�bufsizerp�endrRr�r�s       rr��FileIO.readallqs��	
��������%��	��(�(�4�8�8�Q��1�C��(�(�4�8�8�$�,�,�C��z��)�a�-�������6�{�g�%��f�+���3�w�(;�<�<���#�f�+�%�A�
�������!�,��
���O�F���V�}���'�	��	��#�
����
�s$�AD�!D�
D�D�D,�+D,c��[U5RS5nUR[U55n[U5nX2SU&U$)zSame as RawIOBase.readinto().rN)rrr�r3)rhr'�mr�r�s     rr��FileIO.readinto�s?���q�M���s�#���y�y��Q�� ����I���"�1���rc��UR5 UR5 [R"URU5$![
a gf=f)z�Write bytes b to file, return number written.

Only makes one system call, so not all of the data may be written.
The number of bytes actually written is returned.  In non-blocking mode,
returns None if the write would block.
N)r~r�r-r�r
r�r�s  rr��FileIO.write�sH��	
��������	��8�8�D�H�H�a�(�(���	��	�s� A�
A�Ac��[U[5(a[S5eUR5 [R
"URX5$)a�Move to new file position.

Argument offset is a byte count.  Optional argument whence defaults to
SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values
are SEEK_CUR or 1 (move relative to current position, positive or negative),
and SEEK_END or 2 (move relative to end of file, usually negative, although
many platforms allow seeking beyond the end of a file).

Note that not all file objects are seekable.
zan integer is required)r+rr1r~r-r$r
ros   rrm�FileIO.seek�s>���c�5�!�!��4�5�5������x�x����#�.�.rc�n�UR5 [R"URS[5$)zQtell() -> int.  Current file position.

Can raise OSError for non seekable files.r)r~r-r$r
r	rts rru�FileIO.tell�s'��	
�����x�x����!�X�.�.rc��UR5 UR5 UcUR5n[R"UR
U5 U$)z�Truncate the file to at most size bytes.

Size defaults to the current file position, as returned by tell().
The current file position is changed to the value of size.
)r~r�rur-�	ftruncater
r�s  rrx�FileIO.truncate�sC��	
���������<��9�9�;�D�
���T�X�X�t�$��rc��>�UR(dAUR(a [R"UR5 [
TU]
5 gg![
TU]
5 f=f)zClose the file.

A closed file cannot be used for further I/O operations.  close() may be
called more than once without error.
N)r�rr-rCr
rSrTs �rrC�FileIO.close�sC����{�{�
 ��=�=��H�H�T�X�X�&���
����
��
��s�1A�A%c���UR5 URc$UR5 SUlUR$UR$![a SUlUR$f=f)z$True if file supports random-access.TF)r~�	_seekablerur<rts rr��FileIO.seekable�sf�������>�>�!�
&��	�	��"&����~�~��t�~�~���	�
'�!&����~�~��	
'�s�A�A-�,A-c�:�UR5 UR$)z'True if file was opened in a read mode.)r~rrts rr��FileIO.readable���������~�~�rc�:�UR5 UR$)z(True if file was opened in a write mode.)r~rrts rr��FileIO.writable�rUrc�:�UR5 UR$)z3Return the underlying file descriptor (an integer).)r~r
rts rr:�
FileIO.fileno�s�������x�x�rc�b�UR5 [R"UR5$)z.True if the file is connected to a TTY device.)r~r-r7r
rts rr7�
FileIO.isatty�s!�������y�y����"�"rc��UR$)z6True if the file descriptor will be closed by close().)rrts rrH�FileIO.closefd�s���}�}�rc���UR(aUR(aggUR(aUR(aggUR(aUR(aggg)zString giving the file modezxb+�xbzab+�abzrb+rX�wb)rrrrrts rrB�FileIO.modesC���=�=��~�~���
�_�_��~�~���
�^�^��~�~���r)	rr"rrr
rrQrri)r"TNr�)$r^r_r`rar
rrrrrQrrr�r0r7r�r�r�r�r�r�rrmrurxrCr�r�r�r:r7r�rHrBrbrvrws@rr6r6�s����
�C��H��I��I��J��I��H�|�|�M�B�D�D�� !�F�� (�/� /�� �
��
�
�
#�
�������rr6c�n�\rSrSrSrS
SjrSrSSjrSrSr	\
S	5r\
S
5r\
S5r
Srg)�
TextIOBaseizbBase class for text I/O.

This class provides a character and line based interface to stream
I/O.
c�&�URS5 g)z�Read at most size characters from stream, where size is an int.

Read from underlying buffer until we have size characters or we hit EOF.
If size is negative or omitted, read until EOF.

Returns a string.
r�Nrnr�s  rr��TextIOBase.reads��	
���&�!rc�&�URS5 g)z.Write string s to stream and returning an int.r�Nrn)rh�ss  rr��TextIOBase.write(s�����'�"rNc�&�URS5 g)z*Truncate size to pos, where pos is an int.rxNrnrys  rrx�TextIOBase.truncate,s�����*�%rc�&�URS5 g)zORead until newline or EOF.

Returns an empty string if EOF is hit immediately.
r�Nrnrts rr��TextIOBase.readline0s��
	
���*�%rc�&�URS5 g)z�
Separate the underlying buffer from the TextIOBase and return it.

After the underlying buffer has been detached, the TextIO is in an
unusable state.
rNrnrts rr�TextIOBase.detach7r	rc��g)zSubclasses should override.Nr]rts rr�TextIOBase.encoding@s��rc��g)zzLine endings translated so far.

Only line endings translated during reading are considered.

Subclasses should override.
Nr]rts r�newlines�TextIOBase.newlinesEs��rc��g)zEError setting of the decoder or encoder.

Subclasses should override.Nr]rts rrF�TextIOBase.errorsOs��
rr]r�r�)r^r_r`rar�r�r�rxr�rr�rrsrFrbr]rrrdrds\���"�#�&�&�$������������rrdc�Z�\rSrSrSrSSjrSSjrSrSrSr	Sr
S	rS
r\
S5rSrg
)�IncrementalNewlineDecoderiYaCodec used when reading a file in universal newlines mode.  It wraps
another incremental decoder, translating \r\n and \r into \n.  It also
records the types of newlines encountered.  When used with
translate=False, it ensures that the newline sequence is returned in
one piece.
c�r�[RRXS9 X lXlSUlSUlg)N)rFrF)�codecs�IncrementalDecoderr�	translate�decoder�seennl�	pendingcr)rhr}r|rFs    rr�"IncrementalNewlineDecoder.__init__`s1���!�!�*�*�4�*�?�"���������rc��URcUnOURRXS9nUR(aU(dU(aSU-nSUlURS5(aU(dUSSnSUlUR	S5nUR	S5U-
nUR	S5U-
nU=R
U=(a URU=(a UR-U=(a UR--slUR(a2U(aURSS5nU(aURSS5nU$)N��final�
Fr*T�
�
)r}�decoderr�rr~�_LF�_CR�_CRLFr|�replace)rh�inputr��output�crlf�cr�lfs       rr�� IncrementalNewlineDecoder.decodegs���<�<���F��\�\�(�(��(�<�F��>�>�v���F�]�F�"�D�N��?�?�4� � ���C�R�[�F�!�D�N��|�|�F�#��
�\�\�$�
�$�
&��
�\�\�$�
�$�
&�������t�x�x�B�O�4�8�8�<��*��
�
�,�	,���>�>�������5�������d�3���
rc��URcSnSnOURR5upUS-nUR(aUS-nX4$)Nrrr)r}�getstater)rhrE�flags   rr��"IncrementalNewlineDecoder.getstate�sK���<�<���C��D����-�-�/�I�C���
���>�>��A�I�D��y�rc��Uup#[US-5UlURb URRX#S-	45 ggr�)r
rr}�setstate)rh�staterEr�s    rr��"IncrementalNewlineDecoder.setstate�s@���	���d�Q�h�����<�<�#��L�L�!�!�3��	�"2�3�$rc�p�SUlSUlURbURR5 gg)NrF)r~rr}�resetrts rr��IncrementalNewlineDecoder.reset�s/���������<�<�#��L�L��� �$rrr�c� �SUR$)N)Nr�r�)r�r�r�)r�r�)r�r�)r�r�r�)r~rts rrs�"IncrementalNewlineDecoder.newlines�s�������	r)r}rr~r|N)�strict)F)r^r_r`rar�rr�r�r�r�r�r�r�r�rsrbr]rrrxrxYsC�����>	�4�!��C�
�C�
�E�
�	��	rrxc��\rSrSrSrSrSrS,SjrSrS,Sjr	Sr
\S	5r\S
5r
\S5r\S5r\S
5rSS\SSS.SjrSrSrSrSrSr\S5r\S5rSrSrSrSrSrSrS-Sjr Sr!Sr"S r#S.S!jr$S"r%S#r&S-S$jr'S%r(S/S&jr)S-S'jr*S(r+S-S)jr,\S*5r-S+r.g)0rAi�a�Character and line based layer over a BufferedIOBase object, buffer.

encoding gives the name of the encoding that the stream will be
decoded or encoded with. It defaults to locale.getencoding().

errors determines the strictness of encoding and decoding (see the
codecs.register) and defaults to "strict".

newline can be None, '', '\n', '\r', or '\r\n'.  It controls the
handling of line endings. If it is None, universal newlines is
enabled.  With this enabled, on input, the lines endings '\n', '\r',
or '\r\n' are translated to '\n' before being returned to the
caller. Conversely, on output, '\n' is translated to the system
default line separator, os.linesep. If newline is any other of its
legal values, that newline becomes the newline when the file is read
and it is returned untranslated. On output, '\n' is converted to the
newline.

If line_buffering is True, a call to flush is implied when a call to
write contains a newline character.
iNc��URU5 [U5nUS:XaUR5n[U[5(d[SU-5e[R"U5R(dSn[Xr-5eUcSnOD[U[5(d[SU-5e[(a[R"U5 XlSUl
SUlSUlUR R#5=UlUl[)UR S5UlUR-X#UXV5 g)	NrrzG%r is not a text encoding; use codecs.open() to handle arbitrary codecsr�r r(rr�)�_check_newliner�_get_locale_encodingr+r/r4rz�lookup�_is_text_encoding�LookupError�
_CHECK_ERRORS�lookup_errorrB�_decoded_chars�_decoded_chars_used�	_snapshotrUr�rQ�_tellingr��
_has_read1�
_configure)rhrUrrFrGrS�
write_throughr�s        rr�TextIOWrapper.__init__�s�����G�$� ��*���x���0�0�2�H��(�C�(�(��3�h�>�?�?��}�}�X�&�8�8�B�C��c�n�-�-��>��F��f�c�*�*� �!5��!>�?�?��}��#�#�F�+��� ���#$�� ����)-���)=�)=�)?�?�����!�$�+�+�w�7�������'�&�	7rc��Ub-[U[5(d[S[U5<35eUS;a[	SU<35eg)Nzillegal newline type: )Nr(r�r�r�zillegal newline value: )r+r/r1�typer4)rhrGs  rr��TextIOWrapper._check_newline�sB����z�'�3�'?�'?��$�w�-�I�J�J��8�8��G�E�F�F�9rc���XlX lSUlSUlSUlU(+UlUSLUlX0lUS:gUlU=(d [RUlX@lXPl
UR(aXUR5(aBUR R#5nUS:wa!UR%5R'S5 gggg![(a gf=f)N�r(r)�	_encoding�_errors�_encoder�_decoder�	_b2cratio�_readuniversal�_readtranslate�_readnl�_writetranslater-�linesep�_writenl�_line_buffering�_write_throughrQr�rUru�_get_encoderr�r�)rhrrFrGrSr��positions       rr��TextIOWrapper._configure�s���!������
���
����")�k���%��o�����&�"�}����-�2�:�:��
�-��+���>�>�d�m�m�o�o��{�{�'�'�)�H��1�}���%�%�'�0�0��3��.�>��
#����s�8C�
C(�'C(c�v�SRURRURR5nURnUSRU5-
nURnUSRU5-
nUSRUR5-$![
a NKf=f![
a N:f=f)Nz<{}.{}z name={0!r}z mode={0!r}z encoding={0!r}>)r4rgr_r`rir=rBr)rhrRrirBs    rr7�TextIOWrapper.__repr__s���������!:�!:�!%���!<�!<�>��	1��9�9�D�
�m�*�*�4�0�0�F�	1��9�9�D�
�m�*�*�4�0�0�F��*�1�1�$�-�-�@�@�@���	��	���	��	�s#�B�B+�
B(�'B(�+
B8�7B8c��UR$r�)r�rts rr�TextIOWrapper.encoding+s���~�~�rc��UR$r�)r�rts rrF�TextIOWrapper.errors/����|�|�rc��UR$r�)r�rts rrS�TextIOWrapper.line_buffering3s���#�#�#rc��UR$r�)r�rts rr��TextIOWrapper.write_through7s���"�"�"rc��UR$r�)rBrts rrU�TextIOWrapper.buffer;r�r)rrFrGrSr�c�$�URbUcUc	U[La[S5eUcUc
URnO&SnO#[	U[
5(d[
SU-5eUc
URnO9[	U[
5(d[
SU-5eUS:XaUR5nU[LaURnURU5 UcURnUcURnUR5 URXUXE5 g)zPReconfigure the text stream with new parameters.

This also flushes the stream.
NzPIt is not possible to set the encoding or newline of stream after the first readr�r rr)r��Ellipsisr\r�r+r/r1r�r�r�r�rSr�rr�)rhrrFrGrSr�s      r�reconfigure�TextIOWrapper.reconfigure?s��
�M�M�%��)�V�-?��x�/�&�'�(�
(��>�������!���F�C�(�(��0�6�9�:�:����~�~�H��h��,�,�� 6�� A�B�B��8�#��4�4�6���h���l�l�G����G�$��!�!�0�0�N�� � �.�.�M��
�
������'�&�	7rc�R�UR(a[S5eUR$)Nr�)r�r4rQrts rr��TextIOWrapper.seekablejs���;�;��<�=�=��~�~�rc�6�URR5$r�)rUr�rts rr��TextIOWrapper.readableor�rc�6�URR5$r�)rUr�rts rr��TextIOWrapper.writablerr�rc�Z�URR5 URUlgr�)rUrrQr�rts rr�TextIOWrapper.flushus������������
rc���URb>UR(d,UR5 URR5 ggg!URR5 f=fr�)rUr�rrCrts rrC�TextIOWrapper.closeysL���;�;�"�4�;�;�
$��
�
�����!�!�#�	,7�"�����!�!�#�rc�.�URR$r�)rUr�rts rr��TextIOWrapper.closed�r�rc�.�URR$r�)rUrirts rri�TextIOWrapper.name�s���{�{���rc�6�URR5$r�)rUr:rts rr:�TextIOWrapper.fileno�����{�{�!�!�#�#rc�6�URR5$r�)rUr7rts rr7�TextIOWrapper.isatty�r�rc�:�UR(a[S5e[U[5(d"[	SUR
R-5e[U5nUR=(d UR=(a SU;nU(a=UR(a,URS:waURSUR5nUR=(d UR5nURU5nURR!U5 UR(aU(dSU;aUR#5 UR$bUR'S5 SUlUR((aUR(R+5 U$)zWrite data, where s is a strr]zcan't write %s to text streamr�r�Nr()r�r4r+r/r1rgr^r3r�r�r�r�r�r��encoderUr�rr��_set_decoded_charsr�r�)rhrh�length�haslf�encoderr's      rr��TextIOWrapper.write�s"���;�;��3�4�4��!�S�!�!��;��K�K�0�0�1�2�
2��Q����%�%�=��)=�)=�L�4�1�9���T�)�)�d�m�m�t�.C��	�	�$��
�
�.�A��-�-�6�4�#4�#4�#6���N�N�1��������!�����U�d�a�i��J�J�L��>�>�%��#�#�B�'�!�D�N��=�=��M�M���!��
rc��[R"UR5nU"UR5UlUR$r�)rz�getincrementalencoderr�r�r�)rh�make_encoders  rr��TextIOWrapper._get_encoder�s0���3�3�D�N�N�C��$�T�\�\�2��
��}�}�rc���[R"UR5nU"UR5nUR(a[X R5nX lU$r�)rz�getincrementaldecoderr�r�r�rxr�r�)rh�make_decoderr}s   r�_get_decoder�TextIOWrapper._get_decoder�sG���3�3�D�N�N�C���t�|�|�,�����/��9L�9L�M�G��
��rc��XlSUlg)zSet the _decoded_chars buffer.rN)r�r�)rh�charss  rr�� TextIOWrapper._set_decoded_chars�s��#��#$�� rc��URnUcURUSnOURX"U-nU=R[U5-
slU$)z'Advance into the _decoded_chars buffer.N)r�r�r3)rhr��offsetr�s    r�_get_decoded_chars� TextIOWrapper._get_decoded_chars�sR���)�)���9��'�'���0�E��'�'���z�:�E�� � �C��J�.� ��rc�L�SSKnUR5$![a gf=f)Nrr)r�getencoding�ImportError)rhrs  rr��"TextIOWrapper._get_locale_encoding�s/��	(��
�%�%�'�'��	�	��	�s��
#�#c�d�URU:a[S5eU=RU-slg)z!Rewind the _decoded_chars buffer.z"rewind decoded_chars out of boundsN)r��AssertionErrorr�s  r�_rewind_decoded_chars�#TextIOWrapper._rewind_decoded_chars�s-���#�#�a�'� �!E�F�F�� � �A�%� rc�\�URc[S5eUR(aURR5upUR(a&UR
R
UR5nO%UR
RUR5nU(+nURRX45nURU5 U(a'[U5[UR5-Ul
OSUl
UR(aWWU-4UlU(+$)zA
Read and decode the next chunk of data from the BufferedReader.
z
no decoderr�)r�r4r�r�r�rUr��_CHUNK_SIZEr�r�r�r3r�r�r�)rh�
dec_buffer�	dec_flags�input_chunk�eof�
decoded_charss      r�_read_chunk�TextIOWrapper._read_chunk�s����=�=� ��\�*�*��=�=�%)�M�M�$:�$:�$<�!�J�
�?�?��+�+�+�+�D�,<�,<�=�K��+�+�*�*�4�+;�+;�<�K��o���
�
�,�,�[�>�
����
�.�� ��-��D�4G�4G�0H�H�D�N� �D�N��=�=�(��k�)A�B�D�N��w�rc�F�XS--US--US--[U5S--$)N�@���)r
)rhr�r
�
bytes_to_feed�need_eof�
chars_to_skips      r�_pack_cookie�TextIOWrapper._pack_cookie�s;���r�M�*�m�S�.@�A��s�"�$�&*�8�n�c�&9�:�	;rc��[US5up#[US5up$[US5up%[US5upgX4U[U5U4$)Nl)�divmodr
)rh�bigint�restr�r
rrrs        r�_unpack_cookie�TextIOWrapper._unpack_cookie	sO�����.��� ��u�-���$�T�5�1���"(��u�"5����M�4��>�=�P�Prc
�`�UR(d[S5eUR(d[S5eUR	5 UR
R
5nURnUb
URcUR(a[S5eU$URup4U[U5-nURnUS:XaURX5$UR5n[UR U-5nSnUS:�awUR#SU45 [UR%USU55n	X�::a1UR5up�U
(dUnXY-nO7U[U
5-nSnO	Xx-nUS-nUS:�aMwSnUR#SU45 X-nUn
US:Xa"URX�5UR#U5 $SnSnSn['U[U55HanUS-
nU[UR%UUUS-55-
nUR5unnU(dUU::aX�-
nUU-nUSSnp�UU:�dMa O1 U[UR%SS	S
95-
nS	nUU:a[S5eURX�X�U5UR#U5 $!UR#U5 f=f)N�!underlying stream is not seekablez(telling position disabled by next() callzpending decoded textrrrrFTr�z'can't reconstruct logical file position)rQr\r�r<rrUrur�r�r�rr3r�rr�r,r�r�r��range)rhr�r}r
�
next_inputr�saved_state�
skip_bytes�	skip_backr�r'�d�	start_pos�start_flags�	bytes_fedr�
chars_decoded�irs                   rru�TextIOWrapper.tell	s����~�~�&�'J�K�K��}�}��D�E�E��
�
���;�;�#�#�%���-�-���?�d�n�n�4��"�"�$�%;�<�<��O�!%����	��C�
�O�#���0�0�
��A���$�$�X�9�9��&�&�(��F	*��T�^�^�m�;�<�J��I��q�.�� � �#�y�!1�2�����z�+�:�'>�?�@���%�"�+�+�-�D�A��$%�	�%�*�
���#�a�&�(�J� !�I��+�J� )�A�
�I�#�q�.�&�
�� � �#�y�!1�2�!�-�I�#�K���!��(�(��@�@
���[�)�5�I��H��M��:�s�:��7���Q��	���W�^�^�J�q��1��4E�%F�!G�G�
�(/�(8�(8�(:�%�
�I�!�m�}�&D��*�I�!�]�2�M�<E�q�!�M�� �M�1��8���W�^�^�C�t�^�%D�!E�E�
��� �=�0�!�"K�L�L��$�$��	�]�L�
���[�)��G���[�)�s!�-BJ�1J�A8J�AJ�J-c�~�UR5 UcUR5nURRU5$r�)rrurUrxrys  rrx�TextIOWrapper.truncater	s0���
�
���;��)�)�+�C��{�{�#�#�C�(�(rc�|�URc[S5eUR5 URnSUlU$)Nzbuffer is already detached)rUr4rrB)rhrUs  rr�TextIOWrapper.detachx	s6���;�;���9�:�:��
�
����������
rc�Z^�U4SjnTR(a[S5eTR(d[S5eU[:Xa$US:wa[S5eSnTR5nO�U[:Xa�US:wa[S5eTR5 TRRSU5nTRS5 STlTR(aTRR5 U"U5 U$US:wa[SU<S	35eUS:a[S
U<35eTR5 TRU5upVpxn	TRRU5 TRS5 STlUS:Xa,TR(aTRR5 OmTR(dU(dU	(aNTR=(d TR5TlTRR!SU45 US4TlU	(axTRR#U5n
TRTRR%X�55 Xj4Tl['TR(5U	:a[+S5eU	TlU"U5 U$)
Nc�>�TR=(d TR5nUS:waURS5 gUR5 g![a gf=f)z9Reset the encoder (merely useful for proper BOM handling)rN)r�r�r�r�r�)r�r�rhs  �r�_reset_encoder�*TextIOWrapper.seek.<locals>._reset_encoder�	sS���	
$��-�-�>�4�+<�+<�+>��
�q�=��$�$�Q�'��M�M�O���
��
�s�#A�
A�Arjr$rz#can't do nonzero cur-relative seeksz#can't do nonzero end-relative seeksr(zunsupported whence (�)rerz#can't restore logical file position)r�r4rQr\r	rur
rrUrmr�r�r�r�r!r�r�r�r�r3r�r<r�)rh�cookierqr7r�r+r
rrrrs`          rrm�TextIOWrapper.seek�	s%���	$��;�;��2�3�3��~�~�&�'J�K�K��X����{�*�+P�Q�Q��F��Y�Y�[�F�
�x�
���{�*�+P�Q�Q��J�J�L��{�{�'�'��6�2�H��#�#�B�'�!�D�N��}�}��
�
�#�#�%��8�$��O��Q�;��&�B�C�C��A�:��F�D�E�E��
�
��

����'�	E�	�m�}�	
������#�����#�����Q�;�4�=�=��M�M���!�
�]�]�i�=� �M�M�@�T�->�->�-@�D�M��M�M�"�"�C��#3�4�'��-�D�N���+�+�*�*�=�9�K��#�#��
�
�$�$�[�;�
=�'�5�D�N��4�&�&�'�-�7��C�D�D�'4�D�$��v���
rc��UR5 UcSnOURnU"5nUR=(d UR5nUS:a`UR
5URURR5SS9-nURbURS5 SUl
U$SnUR
U5n[U5U:aSU(dLUR5(+nX@R
U[U5-
5-
n[U5U:a	U(dMLU$![a [U<S35ef=f)Nr*r�rTr�r(F)r�r�r=r1r�r�rr�rUr�r�r�r3r)rhr�r�r}rRrs      rr��TextIOWrapper.read�	s1�������<��D�
$�!�^�^�
�"�|���-�-�6�4�#4�#4�#6���!�8��-�-�/��n�n�T�[�[�%5�%5�%7�t�n�D�E�F��~�~�)��'�'��+�!%����M��C��,�,�T�2�F��f�+��$�S��*�*�,�,���1�1�$��V��2D�E�E���f�+��$�S�S��M��)"�
?��4�(�*<� =�>�>�
?�s�D+�+Ec�~�SUlUR5nU(dSUlURUl[eU$)NF)r�r�r�rQr�r�s  rr��TextIOWrapper.__next__�	s4����
��}�}����!�D�N� �N�N�D�M����rc��UR(a[S5eUcSnOURnU"5nUR5nSnUR(dUR5 S=pVUR(a+URSU5nUS:�aUS-nGO[[U5nO�UR(amURSU5nURSU5nUS:XaUS:Xa[U5nOkUS-nO�US:XaUS-nO�Xx:aUS-nO�XxS-:XaUS-nO�US-nO�URUR5nUS:�aU[UR5-nO�US:�a[U5U:�aUnOUR5(a)UR(aOUR5(aM)UR(aX0R5-
nOURS	5 SUlU$GM�US:�aXa:�aUnUR#[U5U-
5 USU$![a [	U<S35ef=f)
NrWr*r�rr�rr�rr()r�r4r�r=r1rr�r�r�r�r3r�r�rr�r�r�r)	rhr�r�r��startrp�endpos�nlpos�crposs	         rr��TextIOWrapper.readline�	sJ���;�;��4�5�5��<��D�
$�!�^�^�
�"�|���&�&�(�����}�}����������"�"��i�i��e�,���!�8� �1�W�F����I�E��$�$�
�	�	�$��.���	�	�$��.���B�;���{� #�D�	��"'������b�[�"�Q�Y�F���]�"�Q�Y�F���a�i�'�"�Q�Y�F��#�Q�Y�F���i�i����-���!�8� �3�t�|�|�#4�4�F���q�y�S��Y�$�.�����"�"�$�$��&�&���"�"�$�$��"�"��/�/�1�1���'�'��+�!%�����}�@�1�9����F�	
�"�"�3�t�9�v�#5�6��G�V�}���g"�
?��4�(�*<� =�>�>�
?�s�H(�(Ic�T�UR(aURR$S$r�)r�rsrts rrs�TextIOWrapper.newlinesN
s��)-���t�}�}�%�%�@�D�@r)r�rBr�r�r�r�r�r�r�r�r�r�r�rQr�r�r�r�r�)NNNFFr�)rrFrr�)/r^r_r`rar�rrBrr�r�r7r�rrFrSr�rUr�r�r�r�r�rrCr�rir:r7r�r�r�r�rr�rrrr!rurxrrmr�r�r�rsrbr]rrrArA�s~���,�K��G�
DH�5:�7�BG�>B�7<��HA�"���������$��$��#��#�����"�$��#'�t�)7�V�
&�&�'�$��"��"�� �� �$�$��0�
�%�
�(�&�(�T01�JK�;�Q�a*�F)��I�V�:�[�z�A��ArrAc�b^�\rSrSrSrS
U4SjjrSrSr\S5r	\S5r
SrS	rU=r
$)�StringIOiS
z�Text I/O implementation using an in-memory buffer.

The initial_value argument sets the value of object.  The newline
argument is like the one of TextIOWrapper's constructor.
c�">�[[U][5SSUS9 UcSUlUbe[U[5(d-[SR[U5R55eURU5 URS5 gg)Nr�
surrogatepass)rrFrGFz*initial_value must be str or None, not {0}r)
rSrIrr?r�r+r/r1r4r�r^r�rm)rh�
initial_valuerGrgs   �rr�StringIO.__init__Z
s����
�h��&�w�y�07�.=�/6�	'�	8��?�#(�D� ��$��m�S�1�1�� L�!'���]�(;�(D�(D�!E�G�G��J�J�}�%��I�I�a�L�%rc�H�UR5 UR=(d UR5nUR5nUR	5 URURR5SS9URU5 $!URU5 f=f)NTr�)	rr�r�r�r�r�rUrLr�)rhr}�	old_states   rrL�StringIO.getvaluej
sx���
�
���-�-�6�4�#4�#4�#6���$�$�&�	��
�
��	(��>�>�$�+�+�"6�"6�"8��>�E����Y�'��G���Y�'�s�'B�B!c�,�[RU5$r�)�objectr7rts rr7�StringIO.__repr__t
s�����t�$�$rc��gr�r]rts rrF�StringIO.errorsy
���rc��gr�r]rts rr�StringIO.encoding}
rVrc�&�URS5 g)Nrrnrts rr�StringIO.detach�
s�����(�#r)r�)r(r�)r^r_r`rar�rrLr7r�rFrrrbrvrws@rrIrIS
sI����� (�%�
��������$�$rrI)r)r"r*NNNTN)8r�r-�abcrzr�rr�_threadrr}�platform�msvcrtrr#�iorrr	r
r�r��addr
�	SEEK_DATAr8r�r�dev_moder�r�staticmethodrVrZ�	open_coder=r\r<r4�ABCMetard�registerr��_ior6r�rr?r@r?r�r>rdr{rxrArIr]rr�<module>rhs^���
�
�
���
�)��<�<�&�&�*��H�	�6�6���
�2�{���������&�������&���"����0�1�G�S�Y�Y�5G�5G�
��B�=A�,0�K��K�^� (����I�
��2�2��V�s�{�{�V�p�	�	���6��8#��8#�t�����i� ��	���6��e$�V�e$�N�����>�*�h!�~�h!�VL�n�L�^F�%�F�Pf!�%�f!�RF"�^�F"�RG-�^�^�G-�TY�Y�Y�x
>��>�@�
�
���z�"�R�� 9� 9�R�jb
A�J�b
A�J0$�}�0$��QI�(�'�I�(���
�
�w�
�
�
�s$�H�H*�H'�&H'�*I�?I

?>