Any alternatives to Gio.InputStream.read_async()

Spent several hours trying to figure out why my port of some code from
PyGTK to PyGObject wouldn't work. This code reads and writes huge text
files (server logs) and the low-level read_async() method was nice
because I could read chunks and update a progress bar while the file
was loading. I finally found a bug about introspection and the way the
buffer is passed around to the callbacks and that there is a fix in
GLib -

I don't want to be dependent upon GLib 2.32.2 and newer, so, are there
any alternatives? The only thing I can get working is
load_contents_async() but I can't have a progress bar with that one. I
see load_partial_contents_async() in the API docs but it doesn't seem
to be available in Python (though it's finish() method is... go
figure). But I'm not even sure what that one does anyway.

Any suggestions?

- Micah

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]