Re: Calling help from a python command line

Subject: Re: Calling help from a python command line
From: M Giffin <mgiffin -at- earthlink -dot- net>
To: Heather Duggan <hdugganster -at- gmail -dot- com>
Date: Thu, 27 May 2010 11:14:30 -0700


Although there is probably a way to use Python to get the .chm to do
what you want, I agree with Janet that the command line help would do
better to return help on the command line. Most programmers I know
would probably prefer it that way rather than have a .chm file pop up
(I would). On one API project I use XML source files (that are
largely generated form source code) and output them to HTML, PDF and
plain text for command line help (using XSLT and XSL-FO). The API can
be used with several languages including Python, and when you enter a
command like "help ObjectName" on the command line it returns a page
related to that item. Like a Unix man page.

Mark Giffin

At 09:32 AM 5/27/2010, Janet Swisher wrote:
>Python command-line users are accustomed to accessing help about
>Python commands/functions/classes/etc. using the built-in help()
>function, which displays information from the item's docstring from
>the source code. I strongly recommend using this mechanism rather than
>creating a new way of accessing help for Python objects.
>Just like for Java and .NET, there are tools for extracting
>documentation comments from Python source code and outputting it in a
>more readable format. For example, Epydoc produces output very similar
>to Javadoc:
>If you want to be able to create more traditional documentation that
>integrates API reference information into a higher-level structure,
>consider using Sphinx with the "autodoc" extension:
> It can generate HTML Help source files (which
>you can compile to .chm), or generate HTML files that you can import
>into your single-sourcing tool. But for this type of information, you
>should consider the source code docstrings to be the ultimate "single
>source", in order to support the built-in command-line help.
>Janet Swisher
>Visit my blog at:
>On Thu, May 27, 2010 at 10:13 AM, Heather Duggan
><hdugganster -at- gmail -dot- com> wrote:
> > I seem to have a pent up store of questions. :)
> >
> > I'm writing help files for commands which can either be accessed from an
> > application or from a python command line. We're using .chm files for the
> > application help, but we're somewhat stumped about providing help from the
> > python command line. Although it's possible to bring up the .chm file from
> > the command line, bringing up the *specific* help topic is quite difficult
> > (mainly because the search function is broken from the command line, so the
> > programmer would have to know an exact topic name or index entry
> to locate a
> > topic.)
> >
> > Are we going about this the wrong way? We're not at all wed to using .chm
> > files. We just want the programmers to be able to get help on a
> command from
> > the python command line, and we want to maintain that command-line help in
> > the same way we maintain the rest of our help (i.e., from within a
> > single-sourcing authoring tool.)
> >
> > Thanks,
> >
> > Heather
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Gain access to everything you need to create and publish documentation,
manuals, and other information through multiple channels. Choose
authoring (and import) as well as virtually any output you may need.

- Use this space to communicate with TECHWR-L readers -
- Contact admin -at- techwr-l -dot- com for more information -

You are currently subscribed to TECHWR-L as archive -at- web -dot- techwr-l -dot- com -dot-

To unsubscribe send a blank email to
techwr-l-unsubscribe -at- lists -dot- techwr-l -dot- com
or visit

To subscribe, send a blank email to techwr-l-join -at- lists -dot- techwr-l -dot- com

Send administrative questions to admin -at- techwr-l -dot- com -dot- Visit for more resources and info.

Please move off-topic discussions to the Chat list, at:

Calling help from a python command line: From: Heather Duggan
Re: Calling help from a python command line: From: Janet Swisher

Previous by Author: Re: Adobe AIR or other help format
Next by Author: Re: online help
Previous by Thread: Re: Calling help from a python command line
Next by Thread: Re: Calling help from a python command line

What this post helpful? Share it with friends and colleagues:

Sponsored Ads