[pygtk] text View and Pango Markup

saeed saeed.gnu at gmail.com
Thu Jul 30 11:26:27 WST 2009


If you will apply markup on a GtkTextView, use GtkHtml2 library(not in
Gtk2 itself), that is already wrapped for Python. If you use Ubuntu or
any Debian-Based, install package "python-gtkhtml2" and use module
gtkhtml2 in python, see many examples in:
/usr/share/doc/python-gtkhtml2/examples

On 7/30/09, Bertrand Son Kintanar <b3rxkintanar at gmail.com> wrote:
> On Wed, Jul 29, 2009 at 3:52 PM, Amit Sethi
> <amit.pureenergy at gmail.com>wrote:
>
>> Hi all,
>>         I have some text in the form of html(very simple basic
>> markups like <b> ,<i> etc.... similar to pango) is thier an easy way
>> to render this kind of text using pango markup?
>
>
> I dont think there is an easy way to do this. you need to parse it by hand
> and apply what is written on the faq:
> http://faq.pygtk.org/index.py?req=show&file=faq14.011.htp
>
> this might help as well:
> http://www.mail-archive.com/pygtk@daa.com.au/msg17592.html
>
> --
> b3rx
>
> "Don't be trapped by dogma - which is living with the results of other
> people's thinking. - Steve Jobs"
>
> `There are only 10 types of people in the world — those who understand
> binary, and those who don't.'
>


More information about the pygtk mailing list