Re: Any alternatives to Gio.InputStream.read_async()

Hi Micah,

You could probably use GDataInputStream?  Failing that, types would allow you to pin the memory buffer manually.

But yeah, sorry for leaving that unfixed for so long.

Micah Carrick <micah quixotix com> wrote:

>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
>python-hackers-list mailing list
>python-hackers-list gnome org

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