PATH: //proc/self/root/proc/self/root/opt/alt/python36/lib64/python3.6
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
π __future__.py
β
X
π __phello__.foo.py
β
X
π __pycache__/
X
π _bootlocale.py
β
X
π _collections_abc.py
β
X
π _compat_pickle.py
β
X
π _compression.py
β
X
π _dummy_thread.py
β
X
π _markupbase.py
β
X
π _osx_support.py
β
X
π _pydecimal.py
β
X
π _pyio.py
β
X
π _sitebuiltins.py
β
X
π _strptime.py
β
X
π _sysconfigdata_dm_linux_x86_64-linux-gnu.py
β
X
π _sysconfigdata_m_linux_x86_64-linux-gnu.py
β
X
π _threading_local.py
β
X
π _weakrefset.py
β
X
π abc.py
β
X
π aifc.py
β
X
π antigravity.py
β
X
π argparse.py
β
X
π ast.py
β
X
π asynchat.py
β
X
π asyncio/
X
π asyncore.py
β
X
π base64.py
β
X
π bdb.py
β
X
π binhex.py
β
X
π bisect.py
β
X
π bz2.py
β
X
π cProfile.py
β
X
π calendar.py
β
X
π cgi.py
β
X
π cgitb.py
β
X
π chunk.py
β
X
π cmd.py
β
X
π code.py
β
X
π codecs.py
β
X
π codeop.py
β
X
π collections/
X
π colorsys.py
β
X
π compileall.py
β
X
π concurrent/
X
π config-3.6m/
X
π configparser.py
β
X
π contextlib.py
β
X
π copy.py
β
X
π copyreg.py
β
X
π crypt.py
β
X
π csv.py
β
X
π ctypes/
X
π curses/
X
π datetime.py
β
X
π dbm/
X
π decimal.py
β
X
π difflib.py
β
X
π dis.py
β
X
π distutils/
X
π doctest.py
β
X
π dummy_threading.py
β
X
π email/
X
π encodings/
X
π ensurepip/
X
π enum.py
β
X
π filecmp.py
β
X
π fileinput.py
β
X
π fnmatch.py
β
X
π formatter.py
β
X
π fractions.py
β
X
π ftplib.py
β
X
π functools.py
β
X
π genericpath.py
β
X
π getopt.py
β
X
π getpass.py
β
X
π gettext.py
β
X
π glob.py
β
X
π gzip.py
β
X
π hashlib.py
β
X
π heapq.py
β
X
π hmac.py
β
X
π html/
X
π http/
X
π idlelib/
X
π imaplib.py
β
X
π imghdr.py
β
X
π imp.py
β
X
π importlib/
X
π inspect.py
β
X
π io.py
β
X
π ipaddress.py
β
X
π json/
X
π keyword.py
β
X
π lib-dynload/
X
π lib2to3/
X
π linecache.py
β
X
π locale.py
β
X
π logging/
X
π lzma.py
β
X
π macpath.py
β
X
π macurl2path.py
β
X
π mailbox.py
β
X
π mailcap.py
β
X
π mimetypes.py
β
X
π modulefinder.py
β
X
π multiprocessing/
X
π netrc.py
β
X
π nntplib.py
β
X
π ntpath.py
β
X
π nturl2path.py
β
X
π numbers.py
β
X
π opcode.py
β
X
π operator.py
β
X
π optparse.py
β
X
π os.py
β
X
π pathlib.py
β
X
π pdb.py
β
X
π pickle.py
β
X
π pickletools.py
β
X
π pipes.py
β
X
π pkgutil.py
β
X
π platform.py
β
X
π plistlib.py
β
X
π poplib.py
β
X
π posixpath.py
β
X
π pprint.py
β
X
π profile.py
β
X
π pstats.py
β
X
π pty.py
β
X
π py_compile.py
β
X
π pyclbr.py
β
X
π pydoc.py
β
X
π pydoc_data/
X
π queue.py
β
X
π quopri.py
β
X
π random.py
β
X
π re.py
β
X
π reprlib.py
β
X
π rlcompleter.py
β
X
π runpy.py
β
X
π sched.py
β
X
π secrets.py
β
X
π selectors.py
β
X
π shelve.py
β
X
π shlex.py
β
X
π shutil.py
β
X
π signal.py
β
X
π site-packages/
X
π site.py
β
X
π smtpd.py
β
X
π smtplib.py
β
X
π sndhdr.py
β
X
π socket.py
β
X
π socketserver.py
β
X
π sqlite3/
X
π sre_compile.py
β
X
π sre_constants.py
β
X
π sre_parse.py
β
X
π ssl.py
β
X
π stat.py
β
X
π statistics.py
β
X
π string.py
β
X
π stringprep.py
β
X
π struct.py
β
X
π subprocess.py
β
X
π sunau.py
β
X
π symbol.py
β
X
π symtable.py
β
X
π sysconfig.py
β
X
π tabnanny.py
β
X
π tarfile.py
β
X
π telnetlib.py
β
X
π tempfile.py
β
X
π test/
X
π textwrap.py
β
X
π this.py
β
X
π threading.py
β
X
π timeit.py
β
X
π token.py
β
X
π tokenize.py
β
X
π trace.py
β
X
π traceback.py
β
X
π tracemalloc.py
β
X
π tty.py
β
X
π types.py
β
X
π typing.py
β
X
π unittest/
X
π urllib/
X
π uu.py
β
X
π uuid.py
β
X
π venv/
X
π warnings.py
β
X
π wave.py
β
X
π weakref.py
β
X
π webbrowser.py
β
X
π wsgiref/
X
π xdrlib.py
β
X
π xml/
X
π xmlrpc/
X
π zipapp.py
β
X
π zipfile.py
β
X
SAVING...
BERHASIL DIUBAH!
EDITING: xdrlib.py
"""Implements (a subset of) Sun XDR -- eXternal Data Representation. See: RFC 1014 """ import struct from io import BytesIO from functools import wraps __all__ = ["Error", "Packer", "Unpacker", "ConversionError"] # exceptions class Error(Exception): """Exception class for this module. Use: except xdrlib.Error as var: # var has the Error instance for the exception Public ivars: msg -- contains the message """ def __init__(self, msg): self.msg = msg def __repr__(self): return repr(self.msg) def __str__(self): return str(self.msg) class ConversionError(Error): pass def raise_conversion_error(function): """ Wrap any raised struct.errors in a ConversionError. """ @wraps(function) def result(self, value): try: return function(self, value) except struct.error as e: raise ConversionError(e.args[0]) from None return result class Packer: """Pack various data representations into a buffer.""" def __init__(self): self.reset() def reset(self): self.__buf = BytesIO() def get_buffer(self): return self.__buf.getvalue() # backwards compatibility get_buf = get_buffer @raise_conversion_error def pack_uint(self, x): self.__buf.write(struct.pack('>L', x)) @raise_conversion_error def pack_int(self, x): self.__buf.write(struct.pack('>l', x)) pack_enum = pack_int def pack_bool(self, x): if x: self.__buf.write(b'\0\0\0\1') else: self.__buf.write(b'\0\0\0\0') def pack_uhyper(self, x): try: self.pack_uint(x>>32 & 0xffffffff) except (TypeError, struct.error) as e: raise ConversionError(e.args[0]) from None try: self.pack_uint(x & 0xffffffff) except (TypeError, struct.error) as e: raise ConversionError(e.args[0]) from None pack_hyper = pack_uhyper @raise_conversion_error def pack_float(self, x): self.__buf.write(struct.pack('>f', x)) @raise_conversion_error def pack_double(self, x): self.__buf.write(struct.pack('>d', x)) def pack_fstring(self, n, s): if n < 0: raise ValueError('fstring size must be nonnegative') data = s[:n] n = ((n+3)//4)*4 data = data + (n - len(data)) * b'\0' self.__buf.write(data) pack_fopaque = pack_fstring def pack_string(self, s): n = len(s) self.pack_uint(n) self.pack_fstring(n, s) pack_opaque = pack_string pack_bytes = pack_string def pack_list(self, list, pack_item): for item in list: self.pack_uint(1) pack_item(item) self.pack_uint(0) def pack_farray(self, n, list, pack_item): if len(list) != n: raise ValueError('wrong array size') for item in list: pack_item(item) def pack_array(self, list, pack_item): n = len(list) self.pack_uint(n) self.pack_farray(n, list, pack_item) class Unpacker: """Unpacks various data representations from the given buffer.""" def __init__(self, data): self.reset(data) def reset(self, data): self.__buf = data self.__pos = 0 def get_position(self): return self.__pos def set_position(self, position): self.__pos = position def get_buffer(self): return self.__buf def done(self): if self.__pos < len(self.__buf): raise Error('unextracted data remains') def unpack_uint(self): i = self.__pos self.__pos = j = i+4 data = self.__buf[i:j] if len(data) < 4: raise EOFError return struct.unpack('>L', data)[0] def unpack_int(self): i = self.__pos self.__pos = j = i+4 data = self.__buf[i:j] if len(data) < 4: raise EOFError return struct.unpack('>l', data)[0] unpack_enum = unpack_int def unpack_bool(self): return bool(self.unpack_int()) def unpack_uhyper(self): hi = self.unpack_uint() lo = self.unpack_uint() return int(hi)<<32 | lo def unpack_hyper(self): x = self.unpack_uhyper() if x >= 0x8000000000000000: x = x - 0x10000000000000000 return x def unpack_float(self): i = self.__pos self.__pos = j = i+4 data = self.__buf[i:j] if len(data) < 4: raise EOFError return struct.unpack('>f', data)[0] def unpack_double(self): i = self.__pos self.__pos = j = i+8 data = self.__buf[i:j] if len(data) < 8: raise EOFError return struct.unpack('>d', data)[0] def unpack_fstring(self, n): if n < 0: raise ValueError('fstring size must be nonnegative') i = self.__pos j = i + (n+3)//4*4 if j > len(self.__buf): raise EOFError self.__pos = j return self.__buf[i:i+n] unpack_fopaque = unpack_fstring def unpack_string(self): n = self.unpack_uint() return self.unpack_fstring(n) unpack_opaque = unpack_string unpack_bytes = unpack_string def unpack_list(self, unpack_item): list = [] while 1: x = self.unpack_uint() if x == 0: break if x != 1: raise ConversionError('0 or 1 expected, got %r' % (x,)) item = unpack_item() list.append(item) return list def unpack_farray(self, n, unpack_item): list = [] for i in range(n): list.append(unpack_item()) return list def unpack_array(self, unpack_item): n = self.unpack_uint() return self.unpack_farray(n, unpack_item)
SIMPAN PERUBAHAN