I believe there is documentation available online, but for the sake of learning a little more about the interpreter, I am specifically wondering if I can use it to find out what is all available for the button class of the gpiozero module. I have tried things like, help(module) and dir(module), but I am not getting any descriptions of what is actually in the module. I am just starting out with all of this stuff so I hope that I have at least some brevity in my description (I apologise if I don't).

2 Answers 2


This is not a Pi specific question, but all the normal python commands work (at least as well as in any python shell) e.g.

import gpiozero

To document the Button class help(gpiozero.Button)

The gpiozero Documentation is more helpful. https://gpiozero.readthedocs.io/en/stable/

  • If you like, you can also enter interactive help mode by typing help(). Everything that you type therein shall be interpreted as if you enclosed it with help("").
    – user96931
    Commented Mar 24, 2020 at 18:19

Using dir and help on the whole module or on specific classes or objects:

>>> from gpiozero import *
>>> dir(gpiozero)
>>> help(gpiozero)
>>> btn = Button(2)
>>> dir(btn) # or dir(Button)
>>> help(btn) # or help(Button)

Alternatively use the IPython shell and you can use e.g. Button? + <Enter> and get the help quicker.

Not the answer you're looking for? Browse other questions tagged or ask your own question.