MCPcopy
hub / github.com/pyload/pyload / WSGIFileWrapper

Class WSGIFileWrapper

module/lib/bottle.py:1771–1783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1769
1770
1771class WSGIFileWrapper(object):
1772
1773 def __init__(self, fp, buffer_size=1024*64):
1774 self.fp, self.buffer_size = fp, buffer_size
1775 for attr in ('fileno', 'close', 'read', 'readlines'):
1776 if hasattr(fp, attr): setattr(self, attr, getattr(fp, attr))
1777
1778 def __iter__(self):
1779 read, buff = self.fp.read, self.buffer_size
1780 while True:
1781 part = read(buff)
1782 if not part: break
1783 yield part
1784
1785
1786

Callers 1

_castMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected