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