eflSrSSKrSSKrSSKrSSKrSSKrSSKrSSKJr \RS;aSSK J r OSr SSKrSSKJrJrJrJr 1Skr\"\S5(a6\R+\R,5 \R+\R.5 S r\r\"\S 5=(d \R4R6rS.S jr\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>win32cygwin)setmode)__all__SEEK_SETSEEK_CURSEEK_END>r SEEK_HOLEi gettotalrefcountcUca[RR(aSnOSn[RR(aSSKnUR S[ 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. Nutf-8localerz"'encoding' argument not specified.r )sysflags utf8_modewarn_default_encodingwarningswarnEncodingWarning)encoding stacklevelrs +/opt/imh/python3.13/lib/python3.13/_pyio.py text_encodingr(sN 99  HH 99 * *  MM>):> ; Oc[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;n S U;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 Nf=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: %rNinvalid encoding: %rinvalid errors: %rzaxrwb+txrwa+tbz'can't have text and binary mode at oncer z)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 )openerFTzinvalid buffering sizezcan't have unbuffered text I/Ozunknown mode: %r) isinstanceintosfspathstrbytes TypeErrorsetlen ValueErrorrrRuntimeWarningFileIOisattyDEFAULT_BUFFER_SIZEfstatfileno st_blksizeOSErrorAttributeErrorBufferedRandomBufferedWriterBufferedReaderr TextIOWrappermodeclose)filerB bufferingrerrorsnewlineclosefdr)modescreatingreadingwriting appendingupdatingtextbinaryrrawresultline_bufferingbsbuffers ropenrVIsn dC yy dS%- . .*T122 dC *T122 i % %/);<<Jx$=$=.9:: *VS"9"9,v566 IE s9~TSZ!7+d233e|HUlGUlGu Ie|H %Y]szz||I!N q=+I #XXcjjl+666 "I q=56 6 > => > #C3F I#C3F #C3F/$67 7 M *VXwO  5^,  6  s=3N8;.N")'N8A-N8?"N8"N52N84N55N88O cPSSKnURS[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( MM< !% d rc\rSrSrSrg)UnsupportedOperationi4N)__name__ __module__ __qualname____firstlineno____static_attributes__r]rrr\r\4s rr\c\rSrSrSrSrSSjrSrSSjrSr S r S r S r S r SS jrSrSSjrSrSSjr\S5rSSjrSrSrSrSrS SjrSrSrSSjrSrSrg)!IOBasei8aThe 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!') cP[URR<SU<S35e)z@Internal: raise an OSError exception for unsupported operations..z() not supported)r\ __class__r^)selfnames r _unsupportedIOBase._unsupportedZs&"$(NN$;$;T$CD Drc&URS5 g)aChange 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. seekNrjrhposwhences rrm IOBase.seekas &!rc&URSS5$)z5Return an int indicating the current stream position.rr )rmrhs rtell IOBase.tellqsyyArNc&URS5 g)ztTruncate file to size bytes. Size defaults to the current IO position as reported by tell(). Return the new size. truncateNrnrhrps rrxIOBase.truncateu *%rc$UR5 g)zeFlush write buffers, if applicable. This is not implemented for read-only and non-blocking streams. N _checkClosedrts rflush IOBase.flushs rFcpUR(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.closes0 }} % $ !% s, 5cnURnU(agUR5 g![a gf=f)zDestructor. Calls close().N)closedr=rC)rhrs r__del__IOBase.__del__s9 [[F      s ' 44cg)zReturn 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 rseekableIOBase.seekables rcVUR5(d[UcS5eU5eg)zEInternal: raise UnsupportedOperation if file is not seekable NzFile or stream is not seekable.)rr\rhmsgs r_checkSeekableIOBase._checkSeekable=}}&*-+(I@ @;>@ @rcg)zfReturn a bool indicating whether object was opened for reading. If False, read() will raise OSError. Fr]rts rreadableIOBase.readable rcVUR5(d[UcS5eU5eg)zEInternal: raise UnsupportedOperation if file is not readable NzFile or stream is not readable.)rr\rs r_checkReadableIOBase._checkReadablerrcg)zvReturn a bool indicating whether object was opened for writing. If False, write() and truncate() will raise OSError. Fr]rts rwritableIOBase.writablerrcVUR5(d[UcS5eU5eg)zEInternal: raise UnsupportedOperation if file is not writable NzFile or stream is not writable.)rr\rs r_checkWritableIOBase._checkWritablerrcUR$)zuclosed: bool. True iff the file has been closed. For backwards compatibility, this is a property, not a predicate. )rrts rr IOBase.closeds }}rcNUR(a[UcS5eU5eg)z7Internal: raise a ValueError if file is closed NI/O operation on closed file.rr4rs rr~IOBase._checkCloseds4 ;; # =6 6146 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)rhargss r__exit__IOBase.__exit__s  rc&URS5 g)zReturns 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.filenos (#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.isattys 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)rfindr3min) readaheadnrhsizes r nreadahead#IOBase.readline..nreadahead sI IIaL  ^^E*Q.A3y>19At ArcgNr r]r]rrrrsrr* is not an integerrr) hasattr __index__r=r1 bytearrayr3readendswithr0)rhrr size_indexresr's`` rreadlineIOBase.readlines 4    <D $!^^ "|kQh#c(T/ *,'A HC||E"" Qh#c(T/Sz" ?4(*< =>> ?s B55Cc&UR5 U$Nr}rts r__iter__IOBase.__iter__*s  rc@UR5nU(d[eU$r)r StopIterationrhlines r__next__IOBase.__next__.s}}  rcUbUS::a [U5$Sn/nUH*nURU5 U[U5- nX!:dM) U$ U$)zReturn 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)listappendr3)rhhintrlinesrs r readlinesIOBase.readlines4sZ <419:  D LL  TNAy   rcXUR5 UHnURU5 M g)zWrite 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)rhrrs r writelinesIOBase.writelinesFs& D JJt r)__closedrrr*) r^r_r`ra__doc__rjrmrurxrrrCrrrrrrrpropertyrr~rrr:r7rrrrrrbr]rrrdrd8s@D" &H %$@@@6 $(T $rrd) metaclassc4\rSrSrSrS SjrSrSrSrSr g) RawIOBaseiSzBase class for raw binary I/O.cUcSnUS:aUR5$[UR55nURU5nUcgX#S2 [ U5$)zRead 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)readallrrreadintor0)rhrr'rs rrRawIOBase.readasX <D !8<<> ! dnn& ' MM!  9 bEQxrc[5nUR[5=n(a"X- nUR[5=n(aM"U(a [U5$U$)z+Read until EOF, using multiple read() call.)rrr8r0)rhrdatas rrRawIOBase.readallrsPkii 344d4 KCii 344d4 : Krc&URS5 g)zRead 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. rNrnrhr's rrRawIOBase.readinto}r{rc&URS5 g)zWrite the given buffer to the IO stream. Returns the number of bytes written, which may be less than the length of b in bytes. rNrnrs rrRawIOBase.writes '"rr]Nr) r^r_r`rarrrrrrbr]rrrrSs(" &#rr)r6cJ\rSrSrSrS SjrS SjrSrSrSr Sr S r S r g ) BufferedIOBaseiaBase 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. rNrnrhrs rrBufferedIOBase.reads$ &!rc&URS5 g)zQRead up to size bytes with at most one read() system call, where size is an int. read1Nrnrs rrBufferedIOBase.read1s '"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. Fr _readintors rrBufferedIOBase.readintos~~au~--rc"URUSS9$)zRead 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. Trrrs r readinto1BufferedIOBase.readinto1s~~at~,,rc[U[5(d [U5nURS5nU(aUR[ U55nOUR [ U55n[ U5nX1SU&U$)NB)r+ memoryviewcastrr3r)rhr'rrrs rrBufferedIOBase._readintosc!Z((1 A FF3K ::c!f%D99SV$D I"1rc&URS5 g)zWrite 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. rNrnrs rrBufferedIOBase.writes '"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 rrBufferedIOBase.detach (#rr]Nr) r^r_r`rarrrrrrrrrbr]rrrrs* "(# . -  #$rrc\rSrSrSrSrSSjrSrSSjrSr S r S r S r \ S 5r\ S 5r\ S5r\ S5rSrSrSrSrSrg)_BufferedIOMixinizA 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(). cXlgr_rawrhrQs r__init___BufferedIOMixin.__init__s rc^URRX5nUS:a [S5eU$)Nrz#seek() returned an invalid position)rQrmr<)rhrprq new_positions rrm_BufferedIOMixin.seek s.xx}}S1 ! ?@ @rc\URR5nUS:a [S5eU$)Nrz#tell() returned an invalid position)rQrur<rys rru_BufferedIOMixin.tells)hhmmo 7?@ @ rNcUR5 UR5 UR5 UcUR5nURR U5$r)r~rrrurQrxrys rrx_BufferedIOMixin.truncatesL   ;))+Cxx  %%rcpUR(a [S5eURR5 g)Nflush on closed file)rr4rQrrts rr_BufferedIOMixin.flush's# ;;34 4 rcURb>UR(d,UR5 URR5 ggg!URR5 f=fr)rQrrrCrts rrC_BufferedIOMixin.close,sH 88   !  )4   A A)c|URc [S5eUR5 URnSUlU$)Nzraw stream already detached)rQr4rrrs rr_BufferedIOMixin.detach4s6 88 :; ; ii  rc6URR5$r)rQrrts rr_BufferedIOMixin.seekable>xx  ""rcUR$rr rts rrQ_BufferedIOMixin.rawAs yyrc.URR$r)rQrrts rr_BufferedIOMixin.closedEsxxrc.URR$r)rQrirts rri_BufferedIOMixin.nameIxx}}rc.URR$r)rQrBrts rrB_BufferedIOMixin.modeMr*rcJ[SURR<S35eNzcannot pickle z objectr1rgr^rts r __getstate___BufferedIOMixin.__getstate__Q!.)@)@(C7KLLrcURRnURRnURnSR XU5$![ a SR X5s$f=f)Nz<{}.{} name={!r}>z<{}.{}>)rgr_r`riformatr=)rhmodnameclsnameris r__repr___BufferedIOMixin.__repr__Tsf..++..-- F99D'--gE E 6##G5 5 6s A A*)A*c6URR5$r)rQr:rts rr:_BufferedIOMixin.fileno`xx  rc6URR5$r)rQr7rts rr7_BufferedIOMixin.isattycr;rr rr)r^r_r`rarrrmrurxrrCrrrrQrrirBr0r7r:r7rbr]rrr r s   &" !#MF!!rr c^\rSrSrSrSrSSjrSrSrSr U4Sjr SS jr SS jr S r SS jrS rSSjrSrSrSrSrU=r$)BytesIOigzURbURR5 [TU] 5 gr)rBclearsuperrCrhrgs rrC BytesIO.closes& << # LL     rcUR(a [S5eUcSnOURnU"5nUS:a[ UR 5n[ UR 5UR::ag[[ UR 5URU-5nUR URUnX0l[U5$![a [ U<S35ef=f)Nread from closed filer*rrr) rr4rr=r1r3rBrCrr0)rhrrnewposr's rr BytesIO.reads ;;45 5 <D $!^^ "| !8t||$D t||  )S& D(89 LLV , Qx" ?4(*< =>> ?s C C&c$URU5$)z"This is the same as read. )rrs rr BytesIO.read1syyrcUR(a [S5e[U[5(a [ S5e[ U5nUR nSSS5 WS:XagURnU[UR5:a0SU[UR5- -nU=RU- sl XRXDU-&U=RU- slU$!,(df  N=f)Nwrite to closed file can't write str to binary streamr) rr4r+r/r1rnbytesrCr3rB)rhr'viewrrppaddings rr BytesIO.writes ;;34 4 a  >? ? ]d A 6ii T\\" "s4<<'8!89G LLG #L$% Sq! Q ]s  C  C.cUR(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 filerrnegative seek position r r zunsupported whence value) rr4rr=r1rCmaxr3rB)rhrprq pos_indexs rrm BytesIO.seeks ;;23 3  I+C Q;Qw !EFFIyy q[Atyy3/DI yy q[As4<<0367DIyy78 8 :sg%789 9 :s CC,cRUR(a [S5eUR$)Ntell on closed file)rr4rCrts rru BytesIO.tells ;;23 3yyrcUR(a [S5eUc URnO)URnU"5nUS:a[SU<35eUR US2 U$![a [ U<S35ef=f)Nztruncate on closed filerrznegative truncate position )rr4rCrr=r1rB)rhrprgs rrxBytesIO.truncates ;;67 7 ;))C "MM  kQw C!IJJ LL  " >3'); <== >s A''Bc<UR(a [S5egNrTrrts rrBytesIO.readable ;;<= =rc<UR(a [S5egrorrts rrBytesIO.writablerqrc<UR(a [S5egrorrts rrBytesIO.seekablerqr)rBrCrrr)r^r_r`rarrBrr0rLrOrCrrrrmrurxrrrrb __classcell__rgs@rr?r?gsXFG$ #( * &* "  rr?cx\rSrSrSr\4SjrSrSrSSjr SSjr SS jr SS jr SS jr S rS rSSjrSrg)r@izBufferedReader(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. cUR5(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.rinvalid buffer sizeN) rr<r rr4 buffer_size_reset_read_bufLock _read_lockrhrQr{s rrBufferedReader.__init__sX||~~<= =!!$, ! 23 3& &rc6URR5$r)rQrrts rrBufferedReader.readabler#rc SUlSUlg)Nrr) _read_buf _read_posrts rr|BufferedReader._reset_read_bufsrNcUbUS:a [S5eUR URU5sSSS5 $!,(df  g=f)zRead 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_unlockedrs rrBufferedReader.reads;  r >? ? __&&t,__s < A cpSnSnURnURnUbUS:XaUR5 [URS5(a1URR 5nUc 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[X5nSRU5n XSUlSUlU (aU SU$U$)Nr)rNr*rr) rrr|rrQrrr3rjoinrfr{r) rhr nodata_val empty_valuesrErpchunkchunks current_sizeavailwantedouts rrBufferedReader._read_unlocked"s " nnnn 9R  "txx++((*=t9,,t9u,,$i[FL (!&JE *  e$88F#1z 1C3 : NNa N35> !d)T%%q)iHHMM&)E$"  SZ E MM% i MhhvRs2Aw-:-rcURS5 UR URU5sSSS5 $!,(df  g=f)zReturns 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_unlockedrs rrBufferedReader.peekVs2 /0 __&&t,__s 9 Acj[XR5n[UR5UR- nX2:dUS::aYURU- nUR R U5nU(a(URURSU-UlSUlURURS$rA)rr{r3rrrQr)rhrwanthaveto_readcurrents rrBufferedReader._peek_unlockedas1&&'4>>"T^^3 ;$!)&&-GhhmmG,G!%!@7!J!"~~dnno..rc <URS5 US:a URnUS:XagUR URS5 UR [ U[ UR5UR- 55sSSS5 $!,(df  g=f)z?A__s A B  BcTURS5 [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~r3rrrr{rQrr)rhrErwrittenrrs rrBufferedReader._readintos] 34 #z**S/C ::?hhsm __CH$C/$..@#c(Kt~~dnnU6JK .NNe+N$G#c(*s8g%(8(88))#h-8ALG G..q11W9CH$>?_>s "D)F F'c[[RU5[UR5- UR -S5$rA)rfr rur3rrrts rruBufferedReader.tells3#((.T^^1DDt~~UWXYYrcBU[;a [S5eURS5 UR US:Xa%U[ UR 5UR - -n[RXU5nUR5 UsSSS5 $!,(df  g=f)Ninvalid whence valuezseek of closed filer ) valid_seek_flagsr4r~r~r3rrr rmr|ros rrmBufferedReader.seeks{ ) )34 4 /0 __{s4>>*T^^;;"''6:C  " __s AB B)rr~rr{rrr)r^r_r`rarr8rrr|rrrrrrrurmrbr]rrr@r@sG)< !# -2.h - / A&.`Z rr@c\\rSrSrSr\4SjrSrSrSSjr Sr S r S r SS jr S rS rg)r?izA 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. cUR5(d [S5e[RX5 US::a [ S5eX l[ 5Ul[5Ul g)Nz "raw" argument must be writable.rrz) rr<r rr4r{r _write_bufr} _write_lockrs rrBufferedWriter.__init__sT||~~<= =!!$, ! 23 3&#+6rc6URR5$r)rQrrts rrBufferedWriter.writabler#rch[U[5(a [S5eUR UR(a [ S5e[ UR5UR:aUR5 [ UR5nURRU5 [ UR5U- n[ UR5UR:aUR5 UsSSS5 $![an[ UR5UR:ae[ UR5UR- nX5-nURSURUl[URURU5eSnANSnAff=f!,(df  g=f)Nr^r])r+r/r1rrr4r3rr{_flush_unlockedextendBlockingIOErrorerrnostrerror)rhr'beforereoverages rrBufferedWriter.writesS a  >? ?   {{ !7884??#d&6&66$$&)F OO " "1 %$//*V3G4??#d&6&66 L((*/ 'L4??+d.>.>>#&doo"69I9I"I**.//:K4;K;K*L-aggqzz7KK ?L s7B;F#)D9F# F BFF#F  F## F1NcUR UR5 UcURR5nURR U5sSSS5 $!,(df  g=fr)rrrQrurxrys rrxBufferedWriter.truncatesI     "{hhmmo88$$S)   s AA A-cpUR UR5 SSS5 g!,(df  g=fr)rrrts rrBufferedWriter.flushs#     "  s' 5cUR(a [S5eUR(aURR UR5nUc[ [RSS5eU[UR5:dUS:a [S5eURSU2 UR(aMgg![ 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) rr4rrQrr RuntimeErrorrEAGAINr3r<rhrs rrBufferedWriter._flush_unlockeds ;;34 4oo GHHNN4??3y%LL?DD3t''1q5JKK#ooo# G"$FGG Gs %CCcX[RU5[UR5-$r)r rur3rrts rruBufferedWriter.tell s!$$T*S-AAArcU[;a [S5eUR UR5 [R XU5sSSS5 $!,(df  g=f)Nr)rr4rrr rmros rrmBufferedWriter.seeksH ) )34 4     "#((F;  s &A A cUR 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)rrQrrrCrts rrCBufferedWriter.closes   xx4;; #. ! JJL!! "! "!!! "!!s; BB"B B B" C$/C C$ C! C$)rrr{rr)r^r_r`rarr8rrrrxrrrurmrCrbr]rrr?r?s:)< "#8*#$"B< !rr?c\rSrSrSr\4SjrSSjrSrSr SSjr SSjr S r S r S rS 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. cUR5(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)rr<rr@readerr?writer)rhrrr{s rrBufferedRWPair.__init__7sN   ?@ @  ?@ @$V9 $V9 rcBUcSnURRU5$Nr*)rrrs rrBufferedRWPair.readEs! <D{{%%rc8URRU5$r)rrrs rrBufferedRWPair.readintoJs{{##A&&rc8URRU5$r)rrrs rrBufferedRWPair.writeMs{{  ##rc8URRU5$r)rrrs rrBufferedRWPair.peekPs{{%%rc8URRU5$r)rrrs rrBufferedRWPair.read1Ss{{  &&rc8URRU5$r)rrrs rrBufferedRWPair.readinto1Vs{{$$Q''rc6URR5$r)rrrts rrBufferedRWPair.readableY{{##%%rc6URR5$r)rrrts rrBufferedRWPair.writable\rrc6URR5$r)rrrts rrBufferedRWPair.flush_s{{  ""rcURR5 URR5 g!URR5 f=fr)rrCrrts rrCBufferedRWPair.closebs8 KK    KK   DKK   s 7AcxURR5=(d URR5$r)rr7rrts rr7BufferedRWPair.isattyhs'{{!!#;t{{'9'9';;rc.URR$r)rrrts rrBufferedRWPair.closedk{{!!!r)rrNrr)r^r_r`rarr8rrrrrrrrrrrCr7rrrbr]rrrr's] 4G :& '$&'(&&# <""rrcn\rSrSrSr\4SjrSSjrSrSSjr SSjr S r SS jr SS jr S rS rSrg)r>ipzA 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)rr@rr?rs rrBufferedRandom.__init__ys. ;7;7rcU[;a [S5eUR5 UR(aQUR UR R UR[UR5- S5 SSS5 UR R X5nUR UR5 SSS5 US:a [S5eU$!,(df  Na=f!,(df  N2=f)Nrr rz seek() returned invalid position) rr4rrr~rQrmrr3r|r<ros rrmBufferedRandom.seek~s ) )34 4 >> dnns4>>/BBAF!hhmmC( __  " 7<= = ! _s=C/C, C), C:cxUR(a[RU5$[RU5$r)rr?rur@rts rruBufferedRandom.tells+ ??!&&t, ,!&&t, ,rNcRUcUR5n[RX5$r)rur?rxrys rrxBufferedRandom.truncates# ;))+C&&t11rcVUcSnUR5 [RX5$r)rr@rrs rrBufferedRandom.reads& <D ""4..rcLUR5 [RX5$r)rr@rrs rrBufferedRandom.readintos &&t//rcLUR5 [RX5$r)rr@rrs rrBufferedRandom.peeks ""4..rcLUR5 [RX5$r)rr@rrs rrBufferedRandom.read1s ##D//rcLUR5 [RX5$r)rr@rrs rrBufferedRandom.readinto1s ''00rc2UR(aaUR URRUR[ UR5- S5 UR 5 SSS5 [RX5$!,(df  N#=fr) rr~rQrmrr3r|r?rrs rrBufferedRandom.writes` >> dnns4>>/BBAF$$&!##D,,!s A B Br]rrr)r^r_r`rarr8rrmrurxrrrrrrrbr]rrr>r>ps>)<8 "- 2 / 0/01-rr>c^\rSrSrSrSrSrSrSrSr Sr SSjr Sr Sr S rS rSS jrSS jrS rSrSr\4SjrSrSSjrU4SjrSrSrSrSrSr\S5r \S5r!Sr"U=r#$)r6ir*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[S U55S :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:aU(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 Nf=f![<a)n U RJ[JR`:waeSn A NQSn A ff=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]).0cs r "FileIO.__init__..s)DqF{Dsr r%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 nameizexpected integer from openerzNegative file descriptorFr;)1_fd_closefdr-rCr+floatr1r,boolrrr5r4r/r2sumcount_created _writableO_EXCLO_CREAT _readableO_TRUNC _appendingO_APPENDO_RDWRO_RDONLYO_WRONLYgetattrrVr<set_inheritabler9statS_ISDIRst_modeIsADirectoryErrorrEISDIRrr=_blksizer8_setmoderrilseekr ESPIPE) rhrDrBrHr)rfdrnoinherit_flagowned_fdfdfstatrs rrFileIO.__init__s 88q= ==HHTXX& dE " "BC C dC $%% A,<4yBAv !;<<B$$$$89 94yCM)49: : )D) )Q .$**S/A2E9: : $; DM!DNII *E D[!DNE D[!DNJJ+E D[!DN"DOKK"**,E $;!DN!DN >>dnn RYY E ^^ R[[ E R[[ E Z++!"mQ76!"k15  / Av$%NOO>e4B,B%b#..'(FGGAv%&@AA%&&r51#MhhrlG <<00+ELL,.KK ,EtMM1$G\1=DM}}! 3 xR[[)IHHRH- S^"  &ww%,,./ #" sb1Q?B(R,(A"Q& A*R,5Q6 Q#& Q30R,2Q33R,6 R)R$R,$R))R,,ScURS:aSUR(aAUR(d/SSKnUR SU<3[ SUS9 UR 5 gggg)Nrzunclosed file r )rsource)r r rrrResourceWarningrC)rhrs rrFileIO.__del__AsK 88q=T]]4;;  MM6%&t  5 JJL 4?]=rcJ[SURR<S35er.r/rts rr0FileIO.__getstate__Hr2rc dURR<SURR<3nUR(aSU-$URnSU<SU<SUR <SUR <S3 $![a) SXRUR UR 4-s$f=f) Nrfz <%s [closed]>z<%s fd=%d mode=%r closefd=%r>) rgr_r`rrirBr r=r )rh class_nameris rr7FileIO.__repr__Ks $ 9 9 $ ; ;= ;;"Z/ / B99D  tyy$--A B  F3499dmmDE F Fs A<<0B/.B/c<UR(d [S5eg)NzFile not open for reading)rr\rts rrFileIO._checkReadableY~~&'BC Crc<UR(d [S5eg)NzFile not open for writing)rr\rs rrFileIO._checkWritable]r8rcUR5 UR5 UbUS:aUR5$[R"UR U5$![ a gf=f)zRead 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~rrr-rr rrs rr FileIO.readas_   <4!8<<> ! 77488T* *  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 Nf=f![a U(aM/gf=f)zRead 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. rr N)r~rr8r-r$r r r9st_sizer<rr3rfrrr0)rhbufsizerpendrRrrs rrFileIO.readallqs   % ((488Q1C((488$,,Cz)a-6{g%f+3w(;<<#f+%A !,  OFV}'   #  s$AD !D DDD,+D,c[U5RS5nUR[U55n[U5nX2SU&U$)zSame as RawIOBase.readinto().rN)rrrr3)rhr'mrrs rrFileIO.readintos? qM  s #yyQ  I"1rcUR5 UR5 [R"URU5$![ a gf=f)zWrite 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~rr-rr rrs rr FileIO.writesH   88DHHa( (  s A AAc[U[5(a [S5eUR5 [R "UR X5$)aMove 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.seeks> c5 ! !45 5 xx#..rcnUR5 [R"URS[5$)zQtell() -> int. Current file position. Can raise OSError for non seekable files.r)r~r-r$r r rts rru FileIO.tells' xx!X..rcUR5 UR5 UcUR5n[R"UR U5 U$)zTruncate 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~rrur- ftruncater rs rrxFileIO.truncatesC   <99;D TXXt$ 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)rr r-rCr rSrTs rrC FileIO.closesC {{ ==HHTXX&    s 1AA%cUR5 URc$UR5 SUlUR$UR$![a SUlUR$f=f)z$True if file supports random-access.TF)r~ _seekablerur<rts rrFileIO.seekablesf  >> ! & "&~~t~~  '!&~~  'sAA-,A-c:UR5 UR$)z'True if file was opened in a read mode.)r~rrts rrFileIO.readable ~~rc:UR5 UR$)z(True if file was opened in a write mode.)r~rrts rrFileIO.writablerUrc:UR5 UR$)z3Return the underlying file descriptor (an integer).)r~r rts rr: FileIO.filenos xxrcbUR5 [R"UR5$)z.True if the file is connected to a TTY device.)r~r-r7r rts rr7 FileIO.isattys! yy""rcUR$)z6True if the file descriptor will be closed by close().)r rts rrHFileIO.closefds}}rcUR(aUR(aggUR(aUR(aggUR(aUR(aggg)zString giving the file modezxb+xbzab+abzrb+rXwb)rrrrrts rrB FileIO.modesC ==~~ __~~ ^^~~r) rr"r rr rrQrri)r"TNr)$r^r_r`rar rrrrrQr rrr0r7rrrrrrrrmrurxrCrrrr:r7rrHrBrbrvrws@rr6r6s CHIIJIH||M BDD !F  (/ /       # rr6cn\rSrSrSrS SjrSrSSjrSrSr \ S 5r \ S 5r \ S 5r S rg) TextIOBaseizbBase class for text I/O. This class provides a character and line based interface to stream I/O. c&URS5 g)zRead 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. rNrnrs rrTextIOBase.reads &!rc&URS5 g)z.Write string s to stream and returning an int.rNrn)rhss rrTextIOBase.write(s '"rNc&URS5 g)z*Truncate size to pos, where pos is an int.rxNrnrys rrxTextIOBase.truncate,s *%rc&URS5 g)zORead until newline or EOF. Returns an empty string if EOF is hit immediately. rNrnrts rrTextIOBase.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 rrTextIOBase.detach7r rcg)zSubclasses should override.Nr]rts rrTextIOBase.encoding@srcg)zzLine endings translated so far. Only line endings translated during reading are considered. Subclasses should override. Nr]rts rnewlinesTextIOBase.newlinesEsrcg)zEError setting of the decoder or encoder. Subclasses should override.Nr]rts rrFTextIOBase.errorsOs rr]rr)r^r_r`rarrrrxrrrrrsrFrbr]rrrdrds\ "#&&$rrdcZ\rSrSrSrSSjrSSjrSrSrSr Sr S r S r \ S 5rS 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. cr[RRXS9 X lXlSUlSUlg)N)rFrF)codecsIncrementalDecoderr translatedecoderseennl pendingcr)rhr}r|rFs rr"IncrementalNewlineDecoder.__init__`s1!!**4*?"  rcURcUnOURRXS9nUR(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$)Nfinal Fr*T  ) r}decoderrrr~_LF_CR_CRLFr|replace)rhinputroutputcrlfcrlfs rr IncrementalNewlineDecoder.decodegs << F\\(((>vF]F"DN ??4 CR[F!DN||F# \\$ $ & \\$ $ & txxBO488<* , ,  >>5d3 rcURcSnSnOURR5upUS-nUR(aUS-nX4$)Nrrr )r}getstater)rhrEflags rr"IncrementalNewlineDecoder.getstatesK << CD --/IC   >> AIDyrcUup#[US-5UlURb URRX#S- 45 ggr)r rr}setstate)rhstaterErs rr"IncrementalNewlineDecoder.setstates@ dQh << # LL ! !3 "2 3 $rcpSUlSUlURbURR5 gg)NrF)r~rr}resetrts rrIncrementalNewlineDecoder.resets/  << # LL    $rr r c SUR$)N)Nrr)rrr)rr)rr)rrr)r~rts rrs"IncrementalNewlineDecoder.newliness r)r}rr~r|N)strict)F)r^r_r`rarrrrrrrrrrrsrbr]rrrxrxYsC > 4 ! C C E   rrxc\rSrSrSrSrSrS,SjrSrS,Sjr Sr \ S 5r \ S 5r \ S 5r\ 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)0rAiaCharacter 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. iNcURU5 [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 codecsrr r(rr)_check_newliner_get_locale_encodingr+r/r4rzlookup_is_text_encoding LookupError _CHECK_ERRORS lookup_errorrB_decoded_chars_decoded_chars_used _snapshotrUrrQ_tellingr _has_read1 _configure)rhrUrrFrGrS write_throughrs rrTextIOWrapper.__init__s  G$ * x 002H(C((3h>? ?}}X&88BCcn- - >Ffc** !5!>??}##F+  #$ )-)=)=)??!$++w7 '& 7rcUb-[U[5(d[S[U5<35eUS;a[ SU<35eg)Nzillegal newline type: )Nr(rrrzillegal newline value: )r+r/r1typer4)rhrGs rrTextIOWrapper._check_newlinesB  z'3'?'?$w-IJ J 8 8GEF F 9rcXlX lSUlSUlSUlU(+UlUSLUlX0lUS:gUlU=(d [RUl X@l XPl UR(aXUR5(aBUR R#5nUS:wa!UR%5R'S5 gggg![(a gf=f)Nr(r) _encoding_errors_encoder_decoder _b2cratio_readuniversal_readtranslate_readnl_writetranslater-linesep_writenl_line_buffering_write_throughrQrrUru _get_encoderrr)rhrrFrGrSrpositions rrTextIOWrapper._configures!   ")k%o &"}-2:: -+ >>dmmoo{{'')H1}%%'003.> #s8C C('C(cvSRURRURR5nURnUSRU5- 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 rr7TextIOWrapper.__repr__s!:!:!%! 199D m**40 0F 199D m**40 0F*11$--@@@       s# B B+ B('B(+ B87B8cUR$r)rrts rrTextIOWrapper.encoding+s ~~rcUR$r)rrts rrFTextIOWrapper.errors/ ||rcUR$r)rrts rrSTextIOWrapper.line_buffering3s###rcUR$r)rrts rrTextIOWrapper.write_through7s"""rcUR$r)rBrts rrUTextIOWrapper.buffer;rr)rrFrGrSrc$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 readrr rr)rEllipsisr\rr+r/r1rrrrrSrrr)rhrrFrGrSrs r reconfigureTextIOWrapper.reconfigure?s  MM %)V-?x/&'( ( >!FC((069: :  ~~Hh,, 6 ABB8#446 h llG G$  !!00N   ..M  '& 7rcRUR(a [S5eUR$)Nr)rr4rQrts rrTextIOWrapper.seekablejs ;;<= =~~rc6URR5$r)rUrrts rrTextIOWrapper.readableorrc6URR5$r)rUrrts rrTextIOWrapper.writablerrrcZURR5 URUlgr)rUrrQrrts rrTextIOWrapper.flushus  rcURb>UR(d,UR5 URR5 ggg!URR5 f=fr)rUrrrCrts rrCTextIOWrapper.closeysL ;; "4;; $  !!# ,7 " !!#rc.URR$r)rUrrts rrTextIOWrapper.closedrrc.URR$r)rUrirts rriTextIOWrapper.names{{rc6URR5$r)rUr:rts rr:TextIOWrapper.fileno{{!!##rc6URR5$r)rUr7rts rr7TextIOWrapper.isattyrrc: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 streamrrNr()rr4r+r/r1rgr^r3rrrrrrencoderUrrr_set_decoded_charsrr)rhrhlengthhaslfencoderr's rrTextIOWrapper.writes" ;;34 4!S!!;KK0012 2Q%%=)=)=L419 T))dmmt.C $ .A--64#4#4#6 NN1  !   Udai JJL >> %  # #B '!DN == MM   ! rc[R"UR5nU"UR5UlUR$r)rzgetincrementalencoderrrr)rh make_encoders rrTextIOWrapper._get_encoders033DNNC $T\\2 }}rc[R"UR5nU"UR5nUR(a[ X R 5nX lU$r)rzgetincrementaldecoderrrrrxrr)rh make_decoderr}s r _get_decoderTextIOWrapper._get_decodersG33DNNC t||,   /9L9LMG rcXlSUlg)zSet the _decoded_chars buffer.rN)rr)rhcharss rr TextIOWrapper._set_decoded_charss##$ rcURnUcURUSnOURX"U-nU=R[U5- slU$)z'Advance into the _decoded_chars buffer.N)rrr3)rhroffsetrs r_get_decoded_chars TextIOWrapper._get_decoded_charssR)) 9''0E''z:E   CJ.  rcLSSKnUR5$![a gf=f)Nrr)r getencoding ImportError)rhrs rr"TextIOWrapper._get_locale_encodings/ (  %%' '   s  ##cdURU:a [S5eU=RU-slg)z!Rewind the _decoded_chars buffer.z"rewind decoded_chars out of boundsN)rAssertionErrorrs r_rewind_decoded_chars#TextIOWrapper._rewind_decoded_charss-  # #a ' !EF 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)rr4rrrrUr _CHUNK_SIZErrrr3rrr)rh dec_buffer dec_flags input_chunkeof decoded_charss r _read_chunkTextIOWrapper._read_chunks == \* * ==%)MM$:$:$< !J ??++++D,<,<=K++**4+;+;   .  -D4G4G0HHDN DN ==(k)ABDNwrcFXS--US--US--[U5S--$)N@)r )rhrr  bytes_to_feedneed_eof chars_to_skips r _pack_cookieTextIOWrapper._pack_cookies;rM*mS.@As"$&*8nc&9: ;rc[US5up#[US5up$[US5up%[US5upgX4U[U5U4$)Nl)divmodr )rhbigintrestrr rrrs r_unpack_cookieTextIOWrapper._unpack_cookie sO. u-$T51"(u"5M4>=PPrc UR(d [S5eUR(d [S5eUR 5 UR R 5nURnUb URcUR(a [S5eU$URup4U[U5-nURnUS:XaURX5$UR5n[UR U-5nSnU[U5::deUS:awUR#SU45 [UR%USU55n X::a1UR5upU (dU nXY-nO7U[U 5-nSnO Xx-nUS-nUS:aMwSnUR#SU45 X-n Un US:Xa"URX5UR#U5 $SnSnSn['U[U55HanUS- nU[UR%UUUS-55- nUR5unnU(dUU::aX- n UU-nUSSnpUU:dMa O1 U[UR%SS S 95- nS nUU:a [S 5eURXXU5UR#U5 $!UR#U5 f=f) N!underlying stream is not seekablez(telling position disabled by next() callzpending decoded textrr rr FTrz'can't reconstruct logical file position)rQr\rr<rrUrurrrrr3rrrr,rrrrange)rhrr}r  next_inputr saved_state skip_bytes skip_backrr'd start_pos start_flags bytes_fedr chars_decodedir s rruTextIOWrapper.tell s~~&'JK K}}DE E ;;##%-- ?dnn4""$%;<<O!% C O#00 A $$X9 9&&( F *T^^m;?@%"++-DA$% %* #a&(J !I+J )A I#q.&   #y!12!-I#K!((@@   [ )5IHM:s:7Q W^^Jq14E%F!GG (/(8(8(:% I!m}&D*I!]2Mc~UR5 UcUR5nURRU5$r)rrurUrxrys rrxTextIOWrapper.truncater s0 ;))+C{{##C((rc|URc [S5eUR5 URnSUlU$)Nzbuffer is already detached)rUr4rrB)rhrUs rrTextIOWrapper.detachx s6 ;; 9: :   rcZ^U4SjnTR(a [S5eTR(d [S5eU[:Xa$US:wa [S5eSnTR 5nOU[ :XaUS:wa [S5eTR5 TRRSU5nTRS5 STl TR(aTRR5 U"U5 U$US:wa[SU<S 35eUS:a[S U<35eTR5 TRU5upVpxn TRRU5 TRS5 STl US:Xa,TR(aTRR5 OmTR(dU(dU (aNTR=(d TR5Tl TRR!S U45 US 4Tl U (axTRR#U5n TRTRR%X55 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)rrrrr)rrrhs r_reset_encoder*TextIOWrapper.seek.._reset_encoder sS $-->4+<+<+> q=$$Q'MMO  s#A AArjr$rz#can't do nonzero cur-relative seeksz#can't do nonzero end-relative seeksr(zunsupported whence ()rerz#can't restore logical file position)rr4rQr\r rur rrUrmrrrrr!rrrrr3rr<r) rhcookierqr7rr+r rrrrs ` rrmTextIOWrapper.seek s% $ ;;23 3~~&'JK K X {*+PQQFYY[F x {*+PQQ JJL{{''62H  # #B '!DN}} ##% 8 $O Q;&BC C A:FDE E    ' E m} # # Q;4== MM   ! ]]i= MM@T->->-@DM MM " "C#3 4'-DN ++**=9K  # # $$[; ='5DN4&&'-7CDD'4D $v rcUR5 UcSnOURnU"5nUR=(d UR 5nUS: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*rrTrr(F)rrr=r1rrrrrUrrrr3r)rhrrr}rRrs rrTextIOWrapper.read s1  <D $!^^ "|--64#4#4#6 !8--/nnT[[%5%5%7tnDEF~~)''+!%MC,,T2Ff+$S**,,11$V2DEEf+$SSM)" ?4(*< =>> ?s D++Ec~SUlUR5nU(dSUlURUl[eU$)NF)rrrrQrrs rrTextIOWrapper.__next__ s4 }}!DN NNDM  rcUR(a [S5eUcSnOURnU"5nUR 5nSnUR (dUR5 S=pVUR(a+URSU5nUS:aUS-nGO[[U5nOUR(amURSU5nURSU5nUS:XaUS:Xa [U5nOkUS-nOUS:XaUS-nOXx:aUS-nOXxS-:XaUS-nOUS-nOURUR5nUS:aU[UR5-nOUS:a[U5U:aUnOUR5(a)UR(aOUR5(aM)UR(aX0R 5- nOURS 5 SUlU$GMUS:aXa:aUnUR#[U5U- 5 USU$![a [ U<S35ef=f) NrWr*rrrr rr r()rr4rr=r1rrrrrr3rrrrrrr) rhrrrstartrpendposnlposcrposs rrTextIOWrapper.readline sJ ;;45 5 <D $!^^ "|&&(}}    ""iie,!8 1WFIE$$  $. $.B;{ #D "'b["QYF]"QYFai'"QYF#QYFii -!8 3t||#44FqySY$.""$$&&""$$""//11''+!% }@ 19F ""3t9v#56GV}g" ?4(*< =>> ?s H((IcTUR(aURR$S$r)rrsrts rrsTextIOWrapper.newlinesN s)-t}}%%@D@r)rrBrrrrrrrrrrrrQrrrrr)NNNFFr)rrFrr)/r^r_r`rarr rBrrrr7rrrFrSrrUrrrrrrrCrrir:r7rrrrrrrrrr!rurxrrmrrrrsrbr]rrrArAs~,KG DH5:7BG >B7<HA"$$##"$#'t)7V &&'$""  $$0 % (& (T01JK;Qa*F) IV:[zAArrAcb^\rSrSrSrS U4SjjrSrSr\S5r \S5r Sr S r U=r $) StringIOiS zText 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?rr+r/r1r4rr^rrm)rh initial_valuerGrgs rrStringIO.__init__Z s h&wy07.=/6 ' 8 ?#(D  $mS11 L!'](;(D(D!EGG JJ} % IIaL %rcHUR5 UR=(d UR5nUR5nUR 5 UR UR R5SS9URU5 $!URU5 f=f)NTr) rrrrrrrUrLr)rhr} old_states rrLStringIO.getvaluej sx --64#4#4#6$$&   (>>$++"6"6"8>E   Y 'G  Y 's 'BB!c,[RU5$r)objectr7rts rr7StringIO.__repr__t st$$rcgrr]rts rrFStringIO.errorsy rcgrr]rts rrStringIO.encoding} rVrc&URS5 g)Nrrnrts rrStringIO.detach s (#r)r)r(r)r^r_r`rarrrLr7rrFrrrbrvrws@rrIrIS sI  (% $$rrI)r )r"r*NNNTN)8rr-abcrzrrr_threadrr}platformmsvcrtrr#iorrr r rraddr SEEK_DATAr8rrdev_moderr staticmethodrVrZ open_coder=r\r<r4ABCMetardregisterr_ior6rr r?r@r?rr>rdr{rxrArIr]rrrhs^ )<<&&*H 66 2{&&"01GSYY5G5G B=A,0KK^ ( I 22 Vs{{Vp 68#8#t i  6e$Ve$N>*h!~h!VLnL^F%FPf!%f!RF"^F"RG-^^G-TYYYx >>@ z"R 9 9Rjb AJb AJ0$}0$QI('I(  w   s$ H H*H'&H'*I?I