~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-11 22:43:03 UTC
  • mto: This revision was merged to the branch mainline in revision 2126.
  • Revision ID: john@arbash-meinel.com-20061011224303-917597a4ade5429c
code and doc cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
# TODO: `help commands --all` should show hidden commands
23
23
 
24
24
import sys
25
 
from bzrlib import help_topics
26
 
from bzrlib import osutils
27
25
import textwrap
28
26
 
 
27
from bzrlib import (
 
28
    help_topics,
 
29
    osutils,
 
30
    )
 
31
 
 
32
 
29
33
help_topics.add_topic("commands",
30
34
                      (lambda name, outfile: help_commands(outfile)),
31
35
                      "Basic help for all commands")
32
36
 
33
 
def help(topic=None, outfile = None):
 
37
 
 
38
def help(topic=None, outfile=None):
 
39
    """Write the help for the specific topic to outfile"""
34
40
    if outfile is None:
35
41
        outfile = sys.stdout
36
42
    if topic is None:
89
95
    if doc is None:
90
96
        raise NotImplementedError("sorry, no detailed help yet for %r" % cmdname)
91
97
 
92
 
    print >>outfile, 'usage:', command_usage(cmd_object) 
 
98
    print >>outfile, 'usage:', command_usage(cmd_object)
93
99
 
94
100
    if cmd_object.aliases:
95
101
        print >>outfile, 'aliases:',