• File: uu_codec.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/proc/self/root/opt/alt/python37/lib64/python3.7/encodings/__pycache__/uu_codec.cpython-37.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 3.2 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

Nj#@sdZddlZddlZddlmZdddZdd	d
ZGdddejZGd
ddejZGdddej	Z	Gdddeej
Z
GdddeejZddZdS)aPython 'uu_codec' Codec - UU content transfer encoding.

This codec de/encodes from bytes to bytes.

Written by Marc-Andre Lemburg (mal@lemburg.com). Some details were
adapted from uu.py which was written by Lance Ellinghouse and
modified by Jack Jansen and Fredrik Lundh.
N)BytesIOstrict<data>c	Cs|dkstt|}t}|j}|j}|dd}|dd}|d|d@|fd|d	}x|r~|t||d	}qbW|d
|t	|fS)Nr
z\n
z\rzbegin %o %s
iascii-s 
end
)
AssertionErrorrreadwritereplaceencodebinasciiZb2a_uugetvaluelen)	inputerrorsfilenamemodeinfileoutfilerrchunkr7/opt/alt/python37/lib64/python3.7/encodings/uu_codec.py	uu_encodesrc

Cs|dkstt|}t}|j}|j}x(|}|s:td|dddkr(Pq(Wx|}|rd|dkrfPyt|}WnRtjk
r}z2|ddd@d	dd
}	t|d|	}Wdd}~XYnX||qRW|std|t	|fS)Nrz"Missing "begin" line in input datasbeginsend
r ?zTruncated input data)
r
rreadliner
ValueErrorrZa2b_uuErrorrr)
rrrrr!rsdatavnbytesrrr	uu_decode%s0$r(c@s eZdZdddZdddZdS)	CodecrcCs
t||S)N)r)selfrrrrrrGszCodec.encodecCs
t||S)N)r()r*rrrrrdecodeJszCodec.decodeN)r)r)__name__
__module____qualname__rr+rrrrr)Fs
r)c@seZdZdddZdS)IncrementalEncoderFcCst||jdS)Nr)rr)r*rfinalrrrrNszIncrementalEncoder.encodeN)F)r,r-r.rrrrrr/Msr/c@seZdZdddZdS)IncrementalDecoderFcCst||jdS)Nr)r(r)r*rr0rrrr+RszIncrementalDecoder.decodeN)F)r,r-r.r+rrrrr1Qsr1c@seZdZeZdS)StreamWriterN)r,r-r.bytescharbuffertyperrrrr2Usr2c@seZdZeZdS)StreamReaderN)r,r-r.r3r4rrrrr5Xsr5c
CstjdttttttddS)NuuF)namerr+incrementalencoderincrementaldecoderstreamreaderstreamwriter_is_text_encoding)codecs	CodecInforr(r/r1r5r2rrrrgetregentry]sr?)rrr)r)
__doc__r=riorrr(r)r/r1r2r5r?rrrr<module>s

!