PATH: //usr/lib64/python3.9/encodings
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 __init__.py
↓
X
📁 __pycache__/
X
📄 aliases.py
↓
X
📄 ascii.py
↓
X
📄 base64_codec.py
↓
X
📄 big5.py
↓
X
📄 big5hkscs.py
↓
X
📄 bz2_codec.py
↓
X
📄 charmap.py
↓
X
📄 cp037.pyc
↓
X
📄 cp1006.pyc
↓
X
📄 cp1026.pyc
↓
X
📄 cp1125.py
↓
X
📄 cp1140.pyc
↓
X
📄 cp1250.pyc
↓
X
📄 cp1251.pyc
↓
X
📄 cp1252.pyc
↓
X
📄 cp1253.pyc
↓
X
📄 cp1254.pyc
↓
X
📄 cp1255.pyc
↓
X
📄 cp1256.pyc
↓
X
📄 cp1257.pyc
↓
X
📄 cp1258.pyc
↓
X
📄 cp273.pyc
↓
X
📄 cp424.pyc
↓
X
📄 cp437.pyc
↓
X
📄 cp500.pyc
↓
X
📄 cp720.py
↓
X
📄 cp737.pyc
↓
X
📄 cp775.pyc
↓
X
📄 cp850.pyc
↓
X
📄 cp852.pyc
↓
X
📄 cp855.pyc
↓
X
📄 cp856.pyc
↓
X
📄 cp857.pyc
↓
X
📄 cp858.py
↓
X
📄 cp860.pyc
↓
X
📄 cp861.pyc
↓
X
📄 cp862.pyc
↓
X
📄 cp863.pyc
↓
X
📄 cp864.pyc
↓
X
📄 cp865.pyc
↓
X
📄 cp866.pyc
↓
X
📄 cp869.pyc
↓
X
📄 cp874.pyc
↓
X
📄 cp875.pyc
↓
X
📄 cp932.py
↓
X
📄 cp949.py
↓
X
📄 cp950.py
↓
X
📄 euc_jis_2004.py
↓
X
📄 euc_jisx0213.py
↓
X
📄 euc_jp.py
↓
X
📄 euc_kr.py
↓
X
📄 gb18030.py
↓
X
📄 gb2312.py
↓
X
📄 gbk.py
↓
X
📄 hex_codec.py
↓
X
📄 hp_roman8.pyc
↓
X
📄 hz.py
↓
X
📄 idna.py
↓
X
📄 iso2022_jp.py
↓
X
📄 iso2022_jp_1.py
↓
X
📄 iso2022_jp_2.py
↓
X
📄 iso2022_jp_2004.py
↓
X
📄 iso2022_jp_3.py
↓
X
📄 iso2022_jp_ext.py
↓
X
📄 iso2022_kr.py
↓
X
📄 iso8859_1.pyc
↓
X
📄 iso8859_10.pyc
↓
X
📄 iso8859_11.pyc
↓
X
📄 iso8859_13.pyc
↓
X
📄 iso8859_14.pyc
↓
X
📄 iso8859_15.pyc
↓
X
📄 iso8859_16.pyc
↓
X
📄 iso8859_2.pyc
↓
X
📄 iso8859_3.pyc
↓
X
📄 iso8859_4.pyc
↓
X
📄 iso8859_5.pyc
↓
X
📄 iso8859_6.pyc
↓
X
📄 iso8859_7.pyc
↓
X
📄 iso8859_8.pyc
↓
X
📄 iso8859_9.pyc
↓
X
📄 johab.py
↓
X
📄 koi8_r.pyc
↓
X
📄 koi8_t.py
↓
X
📄 koi8_u.pyc
↓
X
📄 kz1048.pyc
↓
X
📄 latin_1.py
↓
X
📄 mac_arabic.pyc
↓
X
📄 mac_croatian.pyc
↓
X
📄 mac_cyrillic.pyc
↓
X
📄 mac_farsi.pyc
↓
X
📄 mac_greek.pyc
↓
X
📄 mac_iceland.pyc
↓
X
📄 mac_latin2.pyc
↓
X
📄 mac_roman.pyc
↓
X
📄 mac_romanian.pyc
↓
X
📄 mac_turkish.pyc
↓
X
📄 mbcs.py
↓
X
📄 oem.py
↓
X
📄 palmos.py
↓
X
📄 ptcp154.pyc
↓
X
📄 punycode.py
↓
X
📄 quopri_codec.py
↓
X
📄 raw_unicode_escape.py
↓
X
📄 rot_13.py
↓
X
📄 shift_jis.py
↓
X
📄 shift_jis_2004.py
↓
X
📄 shift_jisx0213.py
↓
X
📄 tis_620.pyc
↓
X
📄 undefined.py
↓
X
📄 unicode_escape.py
↓
X
📄 utf_16.py
↓
X
📄 utf_16_be.py
↓
X
📄 utf_16_le.py
↓
X
📄 utf_32.py
↓
X
📄 utf_32_be.py
↓
X
📄 utf_32_le.py
↓
X
📄 utf_7.py
↓
X
📄 utf_8.py
↓
X
📄 utf_8_sig.py
↓
X
📄 uu_codec.py
↓
X
📄 zlib_codec.py
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: uu_codec.py
"""Python '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. """ import codecs import binascii from io import BytesIO ### Codec APIs def uu_encode(input, errors='strict', filename='<data>', mode=0o666): assert errors == 'strict' infile = BytesIO(input) outfile = BytesIO() read = infile.read write = outfile.write # Remove newline chars from filename filename = filename.replace('\n','\\n') filename = filename.replace('\r','\\r') # Encode write(('begin %o %s\n' % (mode & 0o777, filename)).encode('ascii')) chunk = read(45) while chunk: write(binascii.b2a_uu(chunk)) chunk = read(45) write(b' \nend\n') return (outfile.getvalue(), len(input)) def uu_decode(input, errors='strict'): assert errors == 'strict' infile = BytesIO(input) outfile = BytesIO() readline = infile.readline write = outfile.write # Find start of encoded data while 1: s = readline() if not s: raise ValueError('Missing "begin" line in input data') if s[:5] == b'begin': break # Decode while True: s = readline() if not s or s == b'end\n': break try: data = binascii.a2b_uu(s) except binascii.Error as v: # Workaround for broken uuencoders by /Fredrik Lundh nbytes = (((s[0]-32) & 63) * 4 + 5) // 3 data = binascii.a2b_uu(s[:nbytes]) #sys.stderr.write("Warning: %s\n" % str(v)) write(data) if not s: raise ValueError('Truncated input data') return (outfile.getvalue(), len(input)) class Codec(codecs.Codec): def encode(self, input, errors='strict'): return uu_encode(input, errors) def decode(self, input, errors='strict'): return uu_decode(input, errors) class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): return uu_encode(input, self.errors)[0] class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False): return uu_decode(input, self.errors)[0] class StreamWriter(Codec, codecs.StreamWriter): charbuffertype = bytes class StreamReader(Codec, codecs.StreamReader): charbuffertype = bytes ### encodings module API def getregentry(): return codecs.CodecInfo( name='uu', encode=uu_encode, decode=uu_decode, incrementalencoder=IncrementalEncoder, incrementaldecoder=IncrementalDecoder, streamreader=StreamReader, streamwriter=StreamWriter, _is_text_encoding=False, )
SIMPAN PERUBAHAN