You need only two commands, if you have already any gtk.Widget:
pango = widget.create_pango_layout('your text')
(text_width, text_height) = pango.get_pixel_size()
You should take into account that text_width and text_height are not constant for your pygtk application during runtime, because user can change system theme, and your application should react accordingly. This type of change is propagated to your application through pango.Layout.context_changed() event.