[ Avaa Bypassed ]




Upload:

Command:

www-data@18.188.0.144: ~ $
"""
A substitute for the Python 3 open() function.

Note that io.open() is more complete but maybe slower. Even so, the
completeness may be a better default. TODO: compare these
"""

_builtin_open = open

class newopen(object):
    """Wrapper providing key part of Python 3 open() interface.

    From IPython's py3compat.py module. License: BSD.
    """
    def __init__(self, fname, mode="r", encoding="utf-8"):
        self.f = _builtin_open(fname, mode)
        self.enc = encoding

    def write(self, s):
        return self.f.write(s.encode(self.enc))

    def read(self, size=-1):
        return self.f.read(size).decode(self.enc)

    def close(self):
        return self.f.close()

    def __enter__(self):
        return self

    def __exit__(self, etype, value, traceback):
        self.f.close()

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 6.67 KB 0644
newbytes.py File 15.92 KB 0644
newdict.py File 3.03 KB 0644
newint.py File 12.97 KB 0644
newlist.py File 2.23 KB 0644
newmemoryview.py File 712 B 0644
newobject.py File 3.28 KB 0644
newopen.py File 810 B 0644
newrange.py File 5.17 KB 0644
newstr.py File 15.39 KB 0644