"Harald Kirsch" <kirschh at lionbioscience.com> wrote in message news:yv2y9sm469d.fsf at lionsp093.lion-ag.de... [snip] > > Fortunately, the parser just calls .read(N) on its > > *That* was the information I was missing. The rest is then more or > less straighforward, as your example code demonstrates. This is not a formally documented constraint on the parser (alas, until and unless interfaces or protocols do get formalized in Python, we'll have to live with lots of informal mentions of [e.g.] "file-like objects" that never clarify WHICH file-object methods do need to be implemented...), but for the current implementation it can be determined experimentally. Code inspection on the library sources AND running a few experiments on an instrumented filelike object (that delegates all to a file but also prints out what is being called) to confirm one's understanding gives you that with a few minutes' investment. Alex
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