Skip to content

Add Override for `Gio.DataInputStream`

Christoph Matthias Kohnen requested to merge cmkohnen/pygobject:master into master

Adds an override for Gio.DataInputStream to enable line iteration using the iter protocol.

This allows for more pythonic file iteration by using snippets like this:

stream = Gio.DataInputStream.new(file.read(None))
for line in stream:
    print(line + '\n')

Merge request reports

Loading