I think you still have to roll your own. Here's a start: def ireadlines(f, s='\n', bs=4096): if not s: raise ValueError, "separator must not be empty" r = [] while 1: b = f.read(bs) if not b: break ofs = 0 while 1: next = b.find(s, ofs) if next == -1: break next += len(s) yield ''.join(r) + b[ofs:next] del r[:] ofs = next r.append(b[ofs:]) yield ''.join(r) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-list/attachments/20050902/c449a923/attachment.sig>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4