1
# Copyright (c) 1996, 1997, The Regents of the University of California.
2
# All rights reserved. See Legal.htm for full text and disclaimer.
5
This is an experimental help facility to get something up and working
6
fairly quickly. It uses your PAGER or the "more" program to display
10
The help function can be called in three slightly different ways:
12
1) To display the help file from the beginning for a module named
13
"foo", try: ``help("foo.")'' (Note the dot).
15
2) To display a particular feature "bar" that you know is in a module
16
named "foo", type ``help("foo.bar")''.
18
3) To search all possible help files for the feature named "bar",
21
Calling help() with no arguments will normally access this help file.
24
The help function itself is in a python module named "help.py",
25
of course. You can import it in the usual fashion, by saying
26
``import help'', in which case you would have to access it by typing
27
``help.help("bar")''. You might prefer to get it by saying ``from help
28
import help'', which will save some typing.
31
It's easy to make up your own help file. If your python module is
32
named "piffle", create a file "piffle.help", and put it somewhere that
33
python can find it, on your PYTHONPATH, or in the default sys.path.
35
A help file is just a series of "features", which are the keywords
36
that you want to be able to reference with help(), each followed by
37
free-form text describing the properties of that feature. Each feature
38
keyword starts in column 1 and ends with a colon (:). It usually makes
39
sense to indent all other text in the file so that the features stand
42
When you type ``help("piffle.snort")'', the help function looks up the
43
file "piffle.help", then starts your pager program with the search
44
pattern ``+/^snort:''. (Refer to the manual page for "more" if you're
45
interested in learning about this option.)