????JFIF??x?x????'
| Server IP : 172.67.174.47 / Your IP : 216.73.216.87 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /././opt/cloudlinux/venv/lib64/python3.11/site-packages/future/types/ |
Upload File : |
"""
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()