def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
python类_fileobject()的实例源码
def __init__(self, locals, conn, banner=None):
Greenlet.__init__(self)
self.locals = locals
self.desc = _fileobject(conn)
self.banner = banner
def readline(self, *a):
return socket._fileobject.readline(self, *a).replace("\r\n", "\n")
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def __init__(self, locals, conn, banner=None):
Greenlet.__init__(self)
self.locals = locals
self.desc = _fileobject(conn)
self.banner = banner
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def __init__(self, locals, conn):
Greenlet.__init__(self)
self.locals = locals
self.desc = _fileobject(conn)
def readline(self, *a):
return socket._fileobject.readline(self, *a).replace("\r\n", "\n")
def makefile(self, mode='r', bufsize=-1):
self._makefile_refs += 1
return _fileobject(self, mode, bufsize, close=True)
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def __init__(self, locals, conn, banner=None):
Greenlet.__init__(self)
self.locals = locals
self.desc = _fileobject(conn)
self.banner = banner
def readline(self, *a):
return socket._fileobject.readline(self, *a).replace("\r\n", "\n")
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def __init__(self, locals, conn, banner=None):
Greenlet.__init__(self)
self.locals = locals
self.desc = _fileobject(conn)
self.banner = banner
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def __init__(self, locals, conn):
Greenlet.__init__(self)
self.locals = locals
self.desc = _fileobject(conn)
def readline(self, *a):
return socket._fileobject.readline(self, *a).replace("\r\n", "\n")
def makefile(self, mode='r', bufsize=-1):
self._makefile_refs += 1
return _fileobject(self, mode, bufsize, close=True)
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
if not PYPY:
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
if not PYPY:
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def __init__(self, locals, conn, banner=None):
Greenlet.__init__(self)
self.locals = locals
self.desc = _fileobject(conn)
self.banner = banner
def readline(self, *a):
return socket._fileobject.readline(self, *a).replace("\r\n", "\n")
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def __init__(self, locals, conn, banner=None):
Greenlet.__init__(self)
self.locals = locals
self.desc = _fileobject(conn)
self.banner = banner
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)
def __init__(self, locals, conn):
Greenlet.__init__(self)
self.locals = locals
self.desc = _fileobject(conn)
def readline(self, *a):
return socket._fileobject.readline(self, *a).replace("\r\n", "\n")
def makefile(self, mode='r', bufsize=-1):
self._makefile_refs += 1
return _fileobject(self, mode, bufsize, close=True)
def makefile(self, mode='r', bufsize=-1):
"""Make and return a file-like object that
works with the SSL connection. Just use the code
from the socket module."""
if not PYPY:
self._makefile_refs += 1
# close=True so as to decrement the reference count when done with
# the file-like object.
return _fileobject(self, mode, bufsize, close=True)