[pygtk] Disappearing pango attributes
finlay at moeraki.com
Fri Jun 26 09:05:40 WST 2009
Krzysztof Kotlenga wrote:
> I have a program which, I believe, should do the same thing in both
> Python and C - set pango attributes on a label. The C version works
> as expected. In PyGTK version attributes get applied only on the first
> character. Any ideas why does this happen? I attach both test cases.
The pygtk pango docs say that the end_index is 1 by default. You need to
specify the end_index=-1 to get the same behavior as the C code. Pango C
code started to set the attribute end_index to a default value in
version 1.20 and the default value used was end of string.
More information about the pygtk