Is there a way to get the labels of running GTK applications?
<p>I am trying to extract labels of widgets of running GTK applications. I tried using GtkParasite but I have no idea how to get it working in my python program.</p>

<p>I want to be able to get the widgets and their labels of a gtk application that is running on my computer. It means that if I run gedit on my system then i want to get the labels of the widgets at run time. I hope this makes sense.</p>

<p>Is there a way to use the C library of GTK to get an instance of a running GTK application?</p>

<p>Thanks in advance.</p>

<p>You probably should use accessibility libraries - those are tools that allow eg. screen readers to read GUI labels for visually impaired users. On Linux, <a href="https://en.wikipedia.org/wiki/Assistive_Technology_Service_Provider_Interface">at-spi2</a> seems to be the de-facto standard.</p>

<p>For Python, take look at at-spi examples:
<a href="https://github.com/infapi00/at-spi2-examples">https://github.com/infapi00/at-spi2-examples</a></p>

python python-2.7 gtk pygtk gtk3