Python Programming/Self Help

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search
Previous: Interactive mode Index Next: Creating Python programs

This book is useful for learning python, but indeed there might be topics that the book does not cover. You might want to search for modules in the standard library, or perhaps inspecting an unknown object's functions, or perhaps you know there is a function that you have to call inside an object but you don't know its name. That's where the interactive help() comes to play.

[edit] Navigating help

When you enter the help system through the help() call within the interactive session, you are presented with a quick introduction to the help system. You can access the different portions of help simply by typing in modules, keywords, or topics

Within these three menus, you get a list of modules, keywords or topics that are available within Python. Typing in the name of one of these will print the help page associated with the item in question.

You can exit the help system by typing quit or by entering a blank line.

[edit] Help parameter

You can obtain information on a specific command without entering interactive help. For example, you can obtain help on a given topic simply by adding a string in quotes, such as help("object"). You may also obtain help on a given object as well, by passing it as a parameter to the help function.

Previous: Interactive mode Index Next: Creating Python programs