[pygtk] Large textview textbuffers files

Funky Fred funkyfredmale at hotmail.com
Thu Mar 1 10:18:13 WST 2007


>the amount of data that makes it sluggish just 20k of chars without
>newlines is enough. I think it has been reported as a bug for GTK

Ah, yes. No newlines. Some of the content would be the result of something 
like this:

textview.set_buffer( bin2ascci.b2a( open( "myfile.zip", "rb+" ).read() ) ) )

Not actual code btw, but the idea :)
Basically, I wanted to view the hex of some files (and others in different 
ways)

I guess the workaround would be to insert new lines ;)

It'll be good though. Arranging the hex in blocks was a goal once I got the 
basics done.
If the line breaks don't work, I'll probably be back with more questions.
Otherwise, thanks for the tip..

>>     search terms site:www.daa.com.au/pipermail/pygtk
And thanks to tony for the tip on using google, didn't know the pipermail 
directory could be searched like that. Once you see it, though, it makes me 
think it should have been obvious to me..
oh well.

-Stu




>From: "Fredrik Corneliusson" <fredrik.corneliusson at gmail.com>
>To: "Tony Nelson" <tonynelson at georgeanelson.com>
>CC: pygtk at daa.com.au, Funky Fred <funkyfredmale at hotmail.com>
>Subject: Re: [pygtk] Large textview textbuffers files
>Date: Wed, 28 Feb 2007 12:27:20 +0100
>
>Hi,
>I know gtk-textview has performance issues with long lines. It is not
>the amount of data that makes it sluggish just 20k of chars without
>newlines is enough. I think it has been reported as a bug for GTK but
>it would require big changes to how text rendering works so no one has
>been willing to fix it.
>But maybe there is a workaround.
>
>Regards,
>Fredrik
>
>On 2/28/07, Tony Nelson <tonynelson at georgeanelson.com> wrote:
>>At 1:53 AM +0000 2/28/07, Funky Fred wrote:
>> >Hello all,
>> >   The first question would be if there was a way of searching the 
>>mailing
>> >list archives - I couldn't find one.
>>  ...
>>
>>You can use Google.  Search for:
>>
>>     search terms site:www.daa.com.au/pipermail/pygtk
>>
>>
>> >But the real question I'm looking for is what the best way to go about
>> >handling the display of large files in gtk.TextViews. ...
>>  ...
>>
>>I don't know.  Does the text need word-wrapping?  If not, try turning it
>>off with gtk.TextView.set_wrap_mode().  It's probably not the only 
>>problem.
>>There may be another text widget more suitable for large amounts of text.
>>--
>>____________________________________________________________________
>>TonyN.:'                       <mailto:tonynelson at georgeanelson.com>
>>       '                              <http://www.georgeanelson.com/>
>>_______________________________________________
>>pygtk mailing list   pygtk at daa.com.au
>>http://www.daa.com.au/mailman/listinfo/pygtk
>>Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>>
>_______________________________________________
>pygtk mailing list   pygtk at daa.com.au
>http://www.daa.com.au/mailman/listinfo/pygtk
>Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

_________________________________________________________________
The average US Credit Score is 675. The cost to see yours: $0 by Experian. 
http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE



More information about the pygtk mailing list