Hacked By AnonymousFox

Current Path : /proc/thread-self/root/opt/alt/python27/lib64/python2.7/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python27/lib64/python2.7/_pyio.pyc

�
^
bc@s�dZddlmZmZddlZddlZddlZddlZddlZddl	Z	yddl
mZWn!e
k
r�ddlmZnXddlZddlmZmZmZmZddl	mZeZddZd	efd
��YZddeeeed�Zd
fd��YZdfd��YZdeefd��YZ dfd��YZ!ej!j"e!�de!fd��YZ#ej#j"e#�ddl$m%Z%e#j"e%�de!fd��YZ&ej&j"e&�de&fd��YZ'de&fd��YZ(de'fd��YZ)d e'fd!��YZ*d"e&fd#��YZ+d$e*e)fd%��YZ,d&e!fd'��YZ-ej-j"e-�d(ej.fd)��YZ/d*e-fd+��YZ0d,e0fd-��YZ1dS(.u)
Python implementation of the io module.
i����(tprint_functiontunicode_literalsN(t
allocate_lock(t__all__tSEEK_SETtSEEK_CURtSEEK_END(tEINTRiitBlockingIOErrorcBseZdZdd�ZRS(uCException raised when I/O would block on a non-blocking I/O stream.icCsJtt|�j||�t|ttf�s=td��n||_dS(Nu$characters_written must be a integer(tsupertIOErrort__init__t
isinstancetinttlongt	TypeErrortcharacters_written(tselfterrnotstrerrorR((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR%s(t__name__t
__module__t__doc__R(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR!surcCs<t|tttf�s+td|��nt|t�sMtd|��nt|ttf�sutd|��n|dk	r�t|t�r�td|��n|dk	r�t|t�r�td|��nt|�}|td�st|�t|�krtd|��nd|k}d|k}	d	|k}
d
|k}d|k}d|k}
d
|kr�|	sz|
r�td��nt	}n|r�|
r�td��n||	|
dkr�td��n|p�|	p�|
s�td��n|
r|dk	rtd��n|
r3|dk	r3td��n|
rT|dk	rTtd��nt
||rfdpid|	rudpxd|
r�d	p�d|r�d
p�d|�}|}yyt}|dks�|dkr�|j�r�d}t	}n|dkrGt
}ytj|j��j}Wntjtfk
r.qGX|dkrG|}qGn|dkrbtd��n|dkr�|
rx|Std��n|r�t||�}nF|	s�|
r�t||�}n(|r�t||�}ntd|��|}|
r�|St|||||�}|}||_|SWn|j��nXdS(u�Open file and return a stream.  Raise IOError 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), 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
    '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)
    'U'       universal newline mode (for backwards compatibility; unneeded
              for new code)
    ========= ===============================================================

    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.

    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 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 controls 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.

    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.

    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.
    uinvalid file: %ruinvalid mode: %ruinvalid buffering: %ruinvalid encoding: %ruinvalid errors: %ruarwb+tUuruwuau+utubuUu$can't use U and writing mode at onceu'can't have text and binary mode at onceiu)can't have read/write/append mode at onceu/must have exactly one of read/write/append modeu-binary mode doesn't take an encoding argumentu+binary mode doesn't take an errors argumentu+binary mode doesn't take a newline argumentuii����uinvalid buffering sizeucan't have unbuffered text I/Ouunknown mode: %rN(Rt
basestringR
RRtNonetsettlent
ValueErrortTruetFileIOtFalsetisattytDEFAULT_BUFFER_SIZEtostfstattfilenot
st_blksizeterrortAttributeErrortBufferedRandomtBufferedWritertBufferedReadert
TextIOWrappertmodetclose(tfileR+t	bufferingtencodingterrorstnewlinetclosefdtmodestreadingtwritingt	appendingtupdatingttexttbinarytrawtresulttline_bufferingtbstbuffer((s*/opt/alt/python27/lib64/python2.7/_pyio.pytopen,s�o(	/	$		
t
DocDescriptorcBseZdZd�ZRS(u%Helper for builtins.open.__doc__
    cCsdtjS(Nu\open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True)

(R?R(Rtobjttyp((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt__get__�s(RRRRC(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR@�stOpenWrappercBs eZdZe�Zd�ZRS(u�Wrapper for builtins.open

    Trick so that open won't become a bound method when stored
    as a class variable (as dbm.dumb does).

    See initstdio() in Python/pythonrun.c.
    cOs
t||�S(N(R?(tclstargstkwargs((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt__new__s(RRRR@RH(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRD�s	tUnsupportedOperationcBseZRS((RR(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRIstIOBasecBs
eZejZd�Zdd�Zd�Zdd�Z	d�Z
eZd�Z
d�Zd�Zdd	�Zd
�Zdd�Zd�Zdd
�Zed��Zdd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zdd�Zd�Z RS(cCs td|jj|f��dS(u8Internal: raise an exception for unsupported operations.u%s.%s() not supportedN(RIt	__class__R(Rtname((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt_unsupported,sicCs|jd�dS(u�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:

        * 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

        Return the new absolute position.
        useekN(RM(Rtpostwhence((s*/opt/alt/python27/lib64/python2.7/_pyio.pytseek3s
cCs|jdd�S(uReturn current stream position.ii(RP(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyttellBscCs|jd�dS(u�Truncate file to size bytes.

        Size defaults to the current IO position as reported by tell().  Return
        the new size.
        utruncateN(RM(RRN((s*/opt/alt/python27/lib64/python2.7/_pyio.pyttruncateFscCs|j�dS(uuFlush write buffers, if applicable.

        This is not implemented for read-only and non-blocking streams.
        N(t_checkClosed(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pytflushPscCs+|js'z|j�Wdt|_XndS(uiFlush and close the IO object.

        This method has no effect if the file is already closed.
        N(t_IOBase__closedRTR(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR,Zs	cCsy|j�WnnXdS(uDestructor.  Calls close().N(R,(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt__del__escCstS(u�Return whether object supports random access.

        If False, seek(), tell() and truncate() will raise IOError.
        This method may need to do a test seek().
        (R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pytseekablesscCs1|j�s-t|dkr!dn|��ndS(u;Internal: raise an IOError if file is not seekable
        uFile or stream is not seekable.N(RWR
R(Rtmsg((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt_checkSeekable{scCstS(udReturn whether object was opened for reading.

        If False, read() will raise IOError.
        (R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pytreadable�scCs1|j�s-t|dkr!dn|��ndS(u;Internal: raise an IOError if file is not readable
        uFile or stream is not readable.N(RZR
R(RRX((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt_checkReadable�scCstS(utReturn whether object was opened for writing.

        If False, write() and truncate() will raise IOError.
        (R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pytwritable�scCs1|j�s-t|dkr!dn|��ndS(u;Internal: raise an IOError if file is not writable
        uFile or stream is not writable.N(R\R
R(RRX((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt_checkWritable�scCs|jS(u�closed: bool.  True iff the file has been closed.

        For backwards compatibility, this is a property, not a predicate.
        (RU(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pytclosed�scCs.|jr*t|dkrdn|��ndS(u7Internal: raise a ValueError if file is closed
        uI/O operation on closed file.N(R^RR(RRX((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRS�s	cCs|j�|S(u+Context management protocol.  Returns self.(RS(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt	__enter__�s
cGs|j�dS(u+Context management protocol.  Calls close()N(R,(RRF((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt__exit__�scCs|jd�dS(u�Returns underlying file descriptor if one exists.

        An IOError is raised if the IO object does not use a file descriptor.
        ufilenoN(RM(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR#�scCs|j�tS(uiReturn whether this is an 'interactive' stream.

        Return False if it can't be determined.
        (RSR(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�s
i����cs�t�d�r$��fd�}n	d�}�dkrBd�n$t�ttf�sftd��nt�}x[�dks�t|��kr��j|��}|s�Pn||7}|j	d�rrPqrqrWt
|�S(	u(Read and return a line from the stream.

        If limit is specified, at most limit bytes will be read.

        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.
        upeekcsZ�jd�}|sdS|jd�dp5t|�}�dkrVt|��}n|S(Nis
i(tpeektfindRtmin(t	readaheadtn(tlimitR(s*/opt/alt/python27/lib64/python2.7/_pyio.pyt
nreadahead�scSsdS(Ni((((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRg�si����ulimit must be an integeris
N(thasattrRRR
RRt	bytearrayRtreadtendswithtbytes(RRfRgtrestb((RfRs*/opt/alt/python27/lib64/python2.7/_pyio.pytreadline�s 
				!
cCs|j�|S(N(RS(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt__iter__�s
cCs|j�}|st�n|S(N(Rot
StopIteration(Rtline((s*/opt/alt/python27/lib64/python2.7/_pyio.pytnext�s	cCs�|dk	r1t|ttf�r1td��n|dksI|dkrSt|�Sd}g}x;|D]3}|j|�|t|�7}||krfPqfqfW|S(u�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.
        uinteger or None expectediN(RRR
RRtlisttappendR(RthintRetlinesRr((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt	readlines�s"


cCs,|j�x|D]}|j|�qWdS(N(RStwrite(RRwRr((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt
writeliness

N(!RRtabctABCMetat
__metaclass__RMRPRQRRRRTRRUR,RVRWRYRZR[R\R]tpropertyR^RSR_R`R#RRoRpRsRxRz(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRJs4	#		
											
$		t	RawIOBasecBs5eZdZdd�Zd�Zd�Zd�ZRS(uBase class for raw binary I/O.i����cCsm|dkrd}n|dkr+|j�St|j��}|j|�}|dkr\dS||3t|�S(u�Read and return up to n bytes.

        Returns an empty bytes object on EOF, or None if the object is
        set not to block and has no data to read.
        i����iN(RtreadallRit	__index__treadintoRl(RReRn((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRj&s	
cCsQt�}x-tr8|jt�}|s+Pn||7}qW|rIt|�S|SdS(u+Read until EOF, using multiple read() call.N(RiRRjR Rl(RRmtdata((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�7s		
cCs|jd�dS(u�Read up to len(b) bytes into b.

        Returns number of bytes read (0 for EOF), or None if the object
        is set not to block and has no data to read.
        ureadintoN(RM(RRn((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�EscCs|jd�dS(u~Write the given buffer to the IO stream.

        Returns the number of bytes written, which may be less than len(b).
        uwriteN(RM(RRn((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRyMs(RRRRjR�R�Ry(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRs
		(RtBufferedIOBasecBsAeZdZdd�Zdd�Zd�Zd�Zd�ZRS(uBase 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.
    cCs|jd�dS(u�Read and return up to n bytes.

        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.
        ureadN(RM(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRjjscCs|jd�dS(u7Read up to n bytes with at most one read() system call.uread1N(RM(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pytread1~scCs�|jt|��}t|�}y|||*WnPtk
r�}ddl}t||j�sh|�n|jd|�||*nX|S(u=Read up to len(b) bytes into b.

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

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

        Raises BlockingIOError if the underlying raw stream has no
        data at the moment.
        i����NRn(RjRRtarrayR(RRnR�ReterrR�((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s	cCs|jd�dS(u�Write the given buffer to the IO stream.

        Return the number of bytes written, which is always len(b).

        Raises BlockingIOError if the buffer is full and the
        underlying raw stream cannot accept more data at the moment.
        uwriteN(RM(RRn((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRy�scCs|jd�dS(u�
        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.
        udetachN(RM(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pytdetach�sN(	RRRRRjR�R�RyR�(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�Ys		
t_BufferedIOMixincBs�eZdZd�Zdd�Zd�Zdd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
ed��Zed
��Zed��Zed��Zd�Zd�Zd�ZRS(u�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().
    cCs
||_dS(N(t_raw(RR:((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�sicCs4|jj||�}|dkr0td��n|S(Niu#seek() returned an invalid position(R:RPR
(RRNROtnew_position((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRP�scCs.|jj�}|dkr*td��n|S(Niu#tell() returned an invalid position(R:RQR
(RRN((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRQ�scCs5|j�|dkr%|j�}n|jj|�S(N(RTRRQR:RR(RRN((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRR�s
cCs)|jrtd��n|jj�dS(Nuflush of closed file(R^RR:RT(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRT�s	cCs?|jdk	r;|jr;z|j�Wd|jj�XndS(N(R:RR^RTR,(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR,�scCs>|jdkrtd��n|j�|j}d|_|S(Nuraw stream already detached(R:RRRTR�(RR:((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s
		cCs
|jj�S(N(R:RW(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRW�scCs
|jj�S(N(R:RZ(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRZ�scCs
|jj�S(N(R:R\(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR\�scCs|jS(N(R�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR:�scCs
|jjS(N(R:R^(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR^�scCs
|jjS(N(R:RL(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRL�scCs
|jjS(N(R:R+(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR+scCsK|jj}y
|j}Wntk
r6dj|�SXdj||�SdS(Nu<_pyio.{0}>u<_pyio.{0} name={1!r}>(RKRRLt	Exceptiontformat(RtclsnameRL((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt__repr__s

cCs
|jj�S(N(R:R#(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR#scCs
|jj�S(N(R:R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRsN(RRRRRPRQRRRRTR,R�RWRZR\R~R:R^RLR+R�R#R(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s$					
					tBytesIOcBs�eZdZdd�Zd�Zd�Zdd�Zd�Zd�Z	dd�Z
d	�Zdd
�Zd�Z
d�Zd
�ZRS(u<Buffered I/O implementation using an in-memory bytes buffer.cCs;t�}|dk	r%|j|�n||_d|_dS(Ni(RiRtextendt_buffert_pos(Rt
initial_bytestbuf((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRs
		cCs%|jrtd��n|jj�S(Nu__getstate__ on closed file(R^Rt__dict__tcopy(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt__getstate__#s	cCs%|jrtd��nt|j�S(u8Return the bytes value (contents) of the buffer
        ugetvalue on closed file(R^RRlR�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pytgetvalue(s	cCs�|jrtd��n|dkr-d}nt|ttf�s`tdjt|����n|dkr~t	|j
�}nt	|j
�|jkr�dStt	|j
�|j|�}|j
|j|!}||_t
|�S(Nuread from closed filei����u$integer argument expected, got {0!r}it(R^RRRR
RRR�ttypeRR�R�RcRl(RRetnewposRn((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRj/s				cCs
|j|�S(u"This is the same as read.
        (Rj(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�@scCs�|jrtd��nt|t�r6td��nt|�}|dkrRdS|j}|t|j�kr�d|t|j�}|j|7_n||j|||+|j|7_|S(Nuwrite to closed fileu$can't write unicode to binary streamis(R^RRtunicodeRRR�R�(RRnReRNtpadding((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRyEs		icCs�|jrtd��ny|jWntk
rBtd��nX|dkr}|dkrqtd|f��n||_nb|dkr�td|j|�|_n:|dkr�tdt|j�|�|_ntd��|jS(Nuseek on closed fileuan integer is requirediunegative seek position %riiuinvalid whence value(	R^RR�R&RR�tmaxRR�(RRNRO((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRPWs 	
"cCs|jrtd��n|jS(Nutell on closed file(R^RR�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRQjs	cCs�|jrtd��n|dkr0|j}nMy|jWntk
rZtd��nX|dkr}td|f��n|j|3|S(Nutruncate on closed fileuan integer is requirediunegative truncate position %r(R^RRR�R�R&RR�(RRN((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRRos	

cCs|jrtd��ntS(NuI/O operation on closed file.(R^RR(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRZ~s	cCs|jrtd��ntS(NuI/O operation on closed file.(R^RR(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR\�s	cCs|jrtd��ntS(NuI/O operation on closed file.(R^RR(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRW�s	N(RRRRRR�R�RjR�RyRPRQRRRZR\RW(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�s							R)cBsqeZdZed�Zd�Zdd�Zdd�Zdd�Z	dd�Z
d�Zd	�Zdd
�Z
RS(uBufferedReader(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.
    cCsi|j�std��ntj||�|dkrFtd��n||_|j�t�|_dS(uMCreate a new buffered reader using the given readable raw IO object.
        u "raw" argument must be readable.iuinvalid buffer sizeN(	RZR
R�RRtbuffer_sizet_reset_read_buftLockt
_read_lock(RR:R�((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�s	
cCsd|_d|_dS(NR�i(t	_read_buft	_read_pos(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s	cCsH|dk	r'|dkr'td��n|j�|j|�SWdQXdS(u�Read n bytes.

        Returns exactly n bytes of data unless the underlying raw IO
        stream reaches EOF or if the call would block in non-blocking
        mode. If n is negative, read until EOF or until read() would
        block.
        i����uinvalid number of bytes to readN(RRR�t_read_unlocked(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRj�s
c
Csd}d}|j}|j}|dks6|dkr�|j�||g}d}x~tr�y|jj�}Wn+tk
r�}	|	jt	krV�qVqVnX||kr�|}Pn|t
|�7}|j|�qVWdj|�p�|St
|�|}
||
kr!|j|7_||||!S||g}t
|j|�}x�|
|kr�y|jj|�}Wn+tk
r�}	|	jt	krC�qCqCnX||kr�|}Pn|
t
|�7}
|j|�qCWt||
�}dj|�}|||_d|_|r|| S|S(NR�i����i(R�N(RR�R�R�RR:RjR
RRRRutjoinR�R�Rc(
RRet
nodata_valtempty_valuesR�RNtchunkstcurrent_sizetchunktetavailtwantedtout((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��sX		

	

	icCs!|j�|j|�SWdQXdS(u�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.
        N(R�t_peek_unlocked(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRa�s
cCs�t||j�}t|j�|j}||ks@|dkr�|j|}xOtr�y|jj|�}Wn+tk
r�}|j	t
krP�qPqPnXPqPW|r�|j|j||_d|_q�n|j|jS(Ni(RcR�RR�R�RR:RjR
RR(RRetwantthavetto_readtcurrentR�((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s 
	c	Csr|dkrtd��n|dkr+dS|j�8|jd�|jt|t|j�|j��SWdQXdS(u9Reads up to n bytes, with at most one read() system call.iu(number of bytes to read must be positiveR�iN(RR�R�R�RcRR�R�(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�s

cCs!tj|�t|j�|jS(N(R�RQRR�R�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRQscCs�d|kodkns+td��n|j�Q|dkr^|t|j�|j8}ntj|||�}|j�|SWdQXdS(Niiuinvalid whence valuei(RR�RR�R�R�RPR�(RRNRO((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRPs

N(RRRR RR�RRjR�RaR�R�RQRP(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR)�s	
	
8
	
	R(cBs_eZdZdZed
d�Zd�Zd
d�Zd�Z	d�Z
d�Zdd	�ZRS(u�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.
    icCs�|j�std��ntj||�|dkrFtd��n|dk	rktjdt|j	�n||_
t�|_t
�|_dS(Nu "raw" argument must be writable.iuinvalid buffer sizeumax_buffer_size is deprecated(R\R
R�RRRtwarningstwarntDeprecationWarningt_warning_stack_offsetR�Rit
_write_bufR�t_write_lock(RR:R�tmax_buffer_size((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR0s
	c	CsJ|jrtd��nt|t�r6td��n|j�t|j�|jkre|j	�nt|j�}|jj
|�t|j�|}t|j�|jkr<y|j	�Wq<tk
r8}t|j�|jkr9t|j�|j}||8}|j|j |_t|j|j
|��q9q<Xn|SWdQXdS(Nuwrite to closed fileu$can't write unicode to binary stream(R^RRR�RR�RR�R�t_flush_unlockedR�RRR(RRntbeforetwrittenR�toverage((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRy?s(	


"cCsL|j�=|j�|dkr2|jj�}n|jj|�SWdQXdS(N(R�R�RR:RQRR(RRN((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRR[s


cCs|j�|j�WdQXdS(N(R�R�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRTbs
cCs�|jrtd��nx�|jr�y|jj|j�}WnGtk
r\td��n+tk
r�}|jt	kr�qqnX|dkr�ttjdd��n|t|j�ks�|dkr�td��n|j|4qWdS(Nuflush of closed fileuHself.raw should implement RawIOBase: it should not raise BlockingIOErroru)write could not complete without blockingiu*write() returned incorrect number of bytes(
R^RR�R:RyRtRuntimeErrorR
RRRtEAGAINR(RReR�((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�fs$	
!cCstj|�t|j�S(N(R�RQRR�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRQ{sicCs\d|kodkns+td��n|j�"|j�tj|||�SWdQXdS(Niiuinvalid whence(RR�R�R�RP(RRNRO((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRP~s


N(
RRRR�R RRRyRRRTR�RQRP(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR(%s				tBufferedRWPaircBs�eZdZedd�Zdd�Zd�Zd�Zdd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zed
��ZRS(u�A 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.
    cCs�|dk	r"tjdtd�n|j�s=td��n|j�sXtd��nt||�|_t	||�|_
dS(uEConstructor.

        The arguments are two RawIO instances.
        umax_buffer_size is deprecatediu#"reader" argument must be readable.u#"writer" argument must be writable.N(RR�R�R�RZR
R\R)treaderR(twriter(RR�R�R�R�((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�scCs%|dkrd}n|jj|�S(Ni����(RR�Rj(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRj�s	cCs|jj|�S(N(R�R�(RRn((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��scCs|jj|�S(N(R�Ry(RRn((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRy�sicCs|jj|�S(N(R�Ra(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRa�scCs|jj|�S(N(R�R�(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��scCs
|jj�S(N(R�RZ(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRZ�scCs
|jj�S(N(R�R\(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR\�scCs
|jj�S(N(R�RT(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRT�scCs&z|jj�Wd|jj�XdS(N(R�R,R�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR,�scCs|jj�p|jj�S(N(R�RR�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�scCs
|jjS(N(R�R^(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR^�sN(RRRR RRRjR�RyRaR�RZR\RTR,RR~R^(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s								R'cBsweZdZdZedd�Zdd�Zd�Zdd�Z	dd�Z
d�Zdd	�Zd
�Z
d�ZRS(
u�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.
    icCs7|j�tj|||�tj||||�dS(N(RYR)RR((RR:R�R�((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�s
icCs�d|kodkns+td��n|j�|jrt|j�(|jj|jt|j�d�WdQXn|jj||�}|j�|j�WdQX|dkr�t	d��n|S(Niiuinvalid whenceiu seek() returned invalid position(
RRTR�R�R:RPR�RR�R
(RRNRO((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRP�s
	
,
cCs'|jrtj|�Stj|�SdS(N(R�R(RQR)(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRQ�s	
cCs+|dkr|j�}ntj||�S(N(RRQR(RR(RRN((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRR�scCs/|dkrd}n|j�tj||�S(Ni����(RRTR)Rj(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRj�s	
cCs|j�tj||�S(N(RTR)R�(RRn((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�s
cCs|j�tj||�S(N(RTR)Ra(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRas
cCs|j�tj||�S(N(RTR)R�(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�s
cCsY|jrI|j�2|jj|jt|j�d�|j�WdQXntj||�S(Ni(	R�R�R:RPR�RR�R(Ry(RRn((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRys
	
#N(RRRR�R RRRPRQRRRjR�RaR�Ry(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR'�s			t
TextIOBasecBsneZdZdd�Zd�Zd
d�Zd�Zd�Ze	d��Z
e	d��Ze	d	��ZRS(u�Base class for text I/O.

    This class provides a character and line based interface to stream
    I/O. There is no readinto method because Python's character strings
    are immutable. There is no public constructor.
    i����cCs|jd�dS(u�Read at most n characters from stream.

        Read from underlying buffer until we have n characters or we hit EOF.
        If n is negative or omitted, read until EOF.
        ureadN(RM(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRj"scCs|jd�dS(uWrite string s to stream.uwriteN(RM(Rts((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRy*scCs|jd�dS(uTruncate size to pos.utruncateN(RM(RRN((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRR.scCs|jd�dS(u_Read until newline or EOF.

        Returns an empty string if EOF is hit immediately.
        ureadlineN(RM(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRo2scCs|jd�dS(u�
        Separate the underlying buffer from the TextIOBase and return it.

        After the underlying buffer has been detached, the TextIO is in an
        unusable state.
        udetachN(RM(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�9scCsdS(uSubclasses should override.N(R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR/BscCsdS(u�Line endings translated so far.

        Only line endings translated during reading are considered.

        Subclasses should override.
        N(R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pytnewlinesGscCsdS(uMError setting of the decoder or encoder.

        Subclasses should override.N(R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR0QsN(
RRRRjRyRRRRoR�R~R/R�R0(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�s				
tIncrementalNewlineDecodercBsbeZdZdd�Zed�Zd�Zd�Zd�ZdZ	dZ
d	Zed
��Z
RS(u+Codec 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.
    ustrictcCs>tjj|d|�||_||_d|_t|_dS(NR0i(tcodecstIncrementalDecoderRt	translatetdecodertseennlRt	pendingcr(RR�R�R0((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRbs
			cCs4|jdkr|}n|jj|d|�}|jr[|sE|r[d|}t|_n|jd�r�|r�|d }t|_n|jd�}|jd�|}|jd�|}|j|o�|j	|o�|j
B|o�|jBO_|jr0|r|j
dd�}n|r0|j
dd�}q0n|S(Ntfinalu
i����u
u
(R�RtdecodeR�RRkRtcountR�t_LFt_CRt_CRLFR�treplace(RtinputR�toutputtcrlftcrtlf((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�is(	

+	cCs]|jdkrd}d}n|jj�\}}|dK}|jrS|dO}n||fS(NR�ii(R�RtgetstateR�(RR�tflag((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s	
	
cCsO|\}}t|d@�|_|jdk	rK|jj||d?f�ndS(Ni(tboolR�R�Rtsetstate(RtstateR�R�((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��scCs5d|_t|_|jdk	r1|jj�ndS(Ni(R�RR�R�Rtreset(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s		iiic
Cs#ddddddddf|jS(Nu
u
u
(u
u
(u
u
(u
u
(u
u
u
(RR�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s(RRRRRR�R�R�R�R�R�R�R~R�(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�[s			R*cBs�eZdZdZd#d#d#ed�Zd�Zed��Z	ed��Z
ed��Zed��Zd�Z
d	�Zd
�Zd�Zd�Zed
��Zed��Zd�Zd�Zd�Zd�Zd�Zd�Zd#d�Zd�Zd�Zddddd�Zd�Zd�Zd#d�Z d�Z!dd�Z"d#d�Z#d �Z$d#d!�Z%ed"��Z&RS($u�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.getpreferredencoding.

    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.
    ic	CsF|dk	r8t|t�r8tdt|�f��n|dkrZtd|f��n|dkr�yddl}Wntk
r�d}q�X|j�}nt|t�s�td	|��nt	j
r�tj|�j
r�d
}tj||dd�n|dkrd
}n"t|t�s4td|��n||_||_||_||_||_|dk|_||_|dk|_|p�tj|_d|_d|_d|_d|_d|_|j j!�|_"|_#|j"rB|j$�rB|j j%�}|dkrBy|j&�j'd�Wq?t(k
r;q?XqBndS(Nuillegal newline type: %ruu
u
u
uillegal newline value: %ri����uasciiuinvalid encoding: %ruG%r is not a text encoding; use codecs.open() to handle arbitrary codecst
stackleveliustrictuinvalid errors: %ri(Nuu
u
u
()RRRRR�RtlocaletImportErrortgetpreferredencodingtsystpy3kwarningR�tlookupt_is_text_encodingR�twarnpy3kR�t_line_bufferingt	_encodingt_errorst_readuniversalt_readtranslatet_readnlt_writetranslateR!tlinesept_writenlt_encodert_decodert_decoded_charst_decoded_chars_usedt	_snapshotR>RWt	_seekablet_tellingR\RQt_get_encoderR�tLookupError(	RR>R/R0R1R<R�RXtposition((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�sR

					
						
cCsEy
|j}Wntk
r-dj|j�SXdj||j�SdS(Nu$<_pyio.TextIOWrapper encoding='{0}'>u/<_pyio.TextIOWrapper name={0!r} encoding='{1}'>(RLR�R�R/(RRL((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�	s

cCs|jS(N(R�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR/scCs|jS(N(R�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR0scCs|jS(N(R�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR<scCs|jS(N(R�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR>scCs|jrtd��n|jS(NuI/O operation on closed file.(R^RR�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRW"s	cCs
|jj�S(N(R>RZ(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRZ'scCs
|jj�S(N(R>R\(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR\*scCs|jj�|j|_dS(N(R>RTR�R�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRT-s
cCs?|jdk	r;|jr;z|j�Wd|jj�XndS(N(R>RR^RTR,(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR,1scCs
|jjS(N(R>R^(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR^8scCs
|jjS(N(R>RL(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRL<scCs
|jj�S(N(R>R#(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR#@scCs
|jj�S(N(R>R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRCscCs/|jrtd��nt|t�s@td|jj��nt|�}|js^|j	ogd|k}|r�|jr�|j
dkr�|jd|j
�}n|jp�|j
�}|j|�}|jj|�|j	r�|s�d|kr�|j�n|jd�d|_|jr+|jj�n|S(Nuwrite to closed fileucan't write %s to text streamu
u
u(R^RRR�RRKRRR�R�R�R�R�R�tencodeR>RyRTt_set_decoded_charsRR�R�R�(RR�tlengththaslftencoderRn((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRyFs&	

		cCs+tj|j�}||j�|_|jS(N(R�tgetincrementalencoderR�R�R�(Rtmake_encoder((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�\scCsLtj|j�}||j�}|jr?t||j�}n||_|S(N(R�tgetincrementaldecoderR�R�R�R�R�R�(Rtmake_decoderR�((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt_get_decoderas		cCs||_d|_dS(uSet the _decoded_chars buffer.iN(R�R�(Rtchars((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�ls	cCsR|j}|dkr%|j|}n|j|||!}|jt|�7_|S(u'Advance into the _decoded_chars buffer.N(R�RR�R(RRetoffsetR((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt_get_decoded_charsqs	cCs1|j|krtd��n|j|8_dS(u!Rewind the _decoded_chars buffer.u"rewind decoded_chars out of boundsN(R�tAssertionError(RRe((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt_rewind_decoded_chars{scCs�|jdkrtd��n|jr?|jj�\}}n|jj|j�}|}|j|jj	||��|jr�|||f|_
n|S(uQ
        Read and decode the next chunk of data from the BufferedReader.
        u
no decoderN(R�RRR�R�R>R�t_CHUNK_SIZER�R�R�(Rt
dec_buffert	dec_flagstinput_chunkteof((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt_read_chunk�s		icCs*||d>B|d>B|d>Bt|�d>BS(Ni@i�i�i(R�(RR�Rt
bytes_to_feedtneed_eoft
chars_to_skip((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt_pack_cookie�scCsgt|d�\}}t|d�\}}t|d�\}}t|d�\}}|||||fS(Nii@llll(tdivmod(RtbiginttrestR�RRRR((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt_unpack_cookie�s
cCs|jstd��n|js0td��n|j�|jj�}|j}|dksm|jdkr�|j	r�t
d��n|S|j\}}|t|�8}|j}|dkr�|j
||�S|j�}z$|jd|f�|}|dd}}	}
d}x�|D]�}|	d7}	|
t|j|��7}
|j�\}
}|
r�|
|kr�||	7}||
8}|dd}}	}
n|
|krPqqW|
t|jddt��7}
d}|
|kr�td��n|j
|||	||�SWd|j|�XdS(	Nu!underlying stream is not seekableu(telling position disabled by next() callupending decoded textiR�iR�u'can't reconstruct logical file position(R�R
R�RTR>RQR�RR�R�RRR�RR�R�R�R(RR�R�Rt
next_inputRtsaved_statet	start_poststart_flagst	bytes_fedt
chars_decodedRt	next_byteR((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRQ�sN		
			



cCs5|j�|dkr%|j�}n|jj|�S(N(RTRRQR>RR(RRN((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRR�s
cCs>|jdkrtd��n|j�|j}d|_|S(Nubuffer is already detached(R>RRRTR�(RR>((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s
		cCs�|jrtd��n|js0td��n|dkrl|dkrWtd��nd}|j�}n|dkr�|dkr�td��n|j�|jjdd�}|jd�d|_
|jr�|jj�n|S|dkrtd	|f��n|dkr)td
|f��n|j�|j
|�\}}}}}|jj|�|jd�d|_
|dkr�|jr�|jj�nU|js�|s�|r�|jp�|j�|_|jjd|f�|df|_
n|rd|jj|�}	|j|jj|	|��||	f|_
t|j�|krXtd��n||_ny|jpy|j�}
Wntk
r�n'X|dkr�|
jd�n
|
j�|S(
Nutell on closed fileu!underlying stream is not seekableiiu#can't do nonzero cur-relative seeksiu#can't do nonzero end-relative seeksuu(invalid whence (%r, should be 0, 1 or 2)unegative seek position %rR�u#can't restore logical file position(R^RR�R
RQRTR>RPR�RR�R�R�RRR�RjR�RR�R�R�R�R�(RtcookieROR�RRRRRRR((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRPsf		

		

	

cCs|j�|dkrd}n|jp1|j�}y|jWntk
r^td��nX|dkr�|j�|j|j	j
�dt�}|jd�d|_
|St}|j|�}xGt|�|kr|r|j�}||j|t|��7}q�W|SdS(Ni����uan integer is requirediR�u(R[RR�RR�R&RR
R�R>RjRR�R�RRR(RReR�R;R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRjHs(
	
	
	
!cCs=t|_|j�}|s9d|_|j|_t�n|S(N(RR�RoRR�R�Rq(RRr((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRsas			cCs�|jrtd��n|dkr-d}n$t|ttf�sQtd��n|j�}d}|jsy|j	�nd}}x�t
rH|jr�|jd|�}|dkr�|d}Pq�t
|�}n�|jr�|jd|�}|jd|�}|dkr2|dkr$t
|�}q�|d}Pq�|dkrL|d}Pq�||krf|d}Pq�||dkr�|d}Pq�|d}Pn5|j|j�}|dkr�|t
|j�}Pn|dkr�t
|�|kr�|}Pnx|j�r|jr�Pq�q�W|jr+||j�7}q�|jd	�d|_|Sq�W|dkrj||krj|}n|jt
|�|�|| S(
Nuread from closed filei����ulimit must be an integeriu
iu
iu(R^RRRR
RRR
R�RRR�RbRR�R�RR�R�R�R(RRfRrtstartRNtendpostnlpostcrpos((s*/opt/alt/python27/lib64/python2.7/_pyio.pyRojsp			

		
	




		
		cCs|jr|jjSdS(N(R�R�R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��sN('RRRR
RRRR�R~R/R0R<R>RWRZR\RTR,R^RLR#RRyR�RR�R
RRRRRQRRR�RPRjRsRoR�(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR*�sH	>													
		"			>	H		XtStringIOcBsVeZdZddd�Zd�Zd�Zed��Zed��Zd�Z	RS(	u�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.
    uu
cCs�tt|�jt�ddddd|�|dkrCt|_n|r�t|t�sgt|�}n|j	|�|j
d�ndS(NR/uutf-8R0ustrictR1i(R	R'RR�RRR�RR�RyRP(Rt
initial_valueR1((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR�s
cCsj|j�|jp|j�}|j�}|j�z |j|jj�dt�SWd|j	|�XdS(NR�(
RTR�RR�R�R�R>R�RR�(RR�t	old_state((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s

 cCs
tj|�S(N(tobjectR�(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��scCsdS(N(R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR0�scCsdS(N(R(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR/�scCs|jd�dS(Nudetach(RM(R((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR��s(
RRRRR�R�R~R0R/R�(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyR'�s	
	(2Rt
__future__RRR!R{R�R�R�RtthreadRR�R�tdummy_threadtioRRRRRR�R}R R
RRRR?R@RDRRIRJtregisterRt_ioRR�R�R�R)R(R�R'R�R�R�R*R'(((s*/opt/alt/python27/lib64/python2.7/_pyio.pyt<module>sZ
"
�	�<
Rjv�aJI?U��

Hacked By AnonymousFox1.0, Coded By AnonymousFox