~ubuntu-branches/ubuntu/karmic/python-scipy/karmic

« back to all changes in this revision

Viewing changes to Lib/xplt/gistdata/help.help

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T. Chen (new)
  • Date: 2005-03-16 02:15:29 UTC
  • Revision ID: james.westby@ubuntu.com-20050316021529-xrjlowsejs0cijig
Tags: upstream-0.3.2
ImportĀ upstreamĀ versionĀ 0.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (c) 1996, 1997, The Regents of the University of California.
 
2
# All rights reserved.  See Legal.htm for full text and disclaimer.
 
3
 
 
4
help:
 
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
 
7
  simple help files.
 
8
 
 
9
  ----------
 
10
  The help function can be called in three slightly different ways:
 
11
 
 
12
    1) To display the help file from the beginning for a module named
 
13
       "foo", try: ``help("foo.")'' (Note the dot).
 
14
 
 
15
    2) To display a particular feature "bar" that you know is in a module
 
16
       named "foo", type ``help("foo.bar")''.
 
17
 
 
18
    3) To search all possible help files for the feature named "bar",
 
19
       type ``help("bar")''.
 
20
    
 
21
    Calling help() with no arguments will normally access this help file.
 
22
  
 
23
  ----------
 
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.
 
29
 
 
30
  ----------
 
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.
 
34
 
 
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
 
40
  out.
 
41
 
 
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.)