Python help

PyCrust provides full support for Python's help functionality. Python's help function displays information about almost all aspects of Python, as displayed in figure 4.5.

File Edit Options Help

1 PyCrust 0.9.4 - The Flakiest Python Shell

2 Sponsored by Orbtech - Your source for Python programming expertise.

4 [GCC 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)] on linux2

5 Type "help", "copyright", "credits" or "license" for more information.

7 Type help() for interactive help, or help(object) for help about object.

10 Welcome to Python 2.3! This is the online help utility.

12 If this is your first time using Python, you should definitely check out

13 the tutorial on the Internet at http://ww.python.org/doc/tut/.

15 Enter the name of any module, keyword, or topic to get help on writing

16 Python programs and using Python modules. To quit this help utility and

17 return to the interpreter, just type "quit".

19 To get a list of available modules, keywords, or topics, type "modules",

20 "keywords", or "topics". Each module also comes with a one-line summary

21 of what it does; to list the modules whose summaries contain a given word

22 such as "spam", type "modules spam".

\ help> keywords 5

5 Here is a list of the Python keywords.

Enter any keyword to get more help.

and

else

assert

except

break

exec

class

finally

continue

for

def

from

del

global

elif

if

import

raise

in

return

is

try

lambda

while

not

yield

or

pass

print

39 You are now leaving help and returning to the Python interpreter.

40 If you want to ask for help on a particular object directly from the

41 interpreter, you can type "help(object)". Executing "help('string')"

42 has the same effect as typing a particular string at the help> prompt.

Namespace Display Calltip Session Dispatcher locals () * Type: <type 'dict'>

PyCrust 0.9.4 - The Flakiest Python Shell, Sponsored by Orbtech - Your source for Python programming expertise.

Figure 4.5 Using Python's help function from within PyCrust

Python's help function provides an additional prompt (help). After using help, you can exit the help mode by entering quit at the help prompt, and return to the regular Python prompt.

Was this article helpful?

0 0

Post a comment