~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help.py

  • Committer: Jonathan Riddell
  • Date: 2011-09-16 10:37:07 UTC
  • mto: This revision was merged to the branch mainline in revision 6144.
  • Revision ID: jriddell@canonical.com-20110916103707-aivba3o9dq42ce7u
add gettext() to BzrCommandError uses

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from __future__ import absolute_import
18
 
 
19
17
# TODO: Some way to get a list of external commands (defined by shell
20
18
# scripts) so that they can be included in the help listing as well.
21
19
# It should be enough to just list the plugin directory and look for
31
29
    help_topics,
32
30
    osutils,
33
31
    plugin,
34
 
    ui,
35
32
    utextwrap,
36
33
    )
37
34
 
39
36
def help(topic=None, outfile=None):
40
37
    """Write the help for the specific topic to outfile"""
41
38
    if outfile is None:
42
 
        outfile = ui.ui_factory.make_output_stream()
 
39
        outfile = sys.stdout
43
40
 
44
41
    indices = HelpIndices()
45
42
 
64
61
def help_commands(outfile=None):
65
62
    """List all commands"""
66
63
    if outfile is None:
67
 
        outfile = ui.ui_factory.make_output_stream()
 
64
        outfile = sys.stdout
68
65
    outfile.write(_help_commands_to_text('commands'))
69
66
 
70
67