Search code examples
pythongtkpygtkdocstring

How to get help of PyGTK methods?


in pygtk when I set the label mylabel = gtk.Label("Hello World!") I can get the string of label from it by mylabel.get() method. but in python interpreter I can't get the docstring of this method: help(gtk.Label.get). Anyone know why?


Solution

  • It might be that what you wanted to ask was answered by @DonQuestion already... however if you truly just wanted to ask why help(gtk.Label.get) doesn't return a help... the answer is actually very simple: because the get method in the Label object lacks a docstring in the source code. :)

    In fact the call to help doesn't generate an error, just an empty answer.