[Python-Dev] onlinehelp unforgiving

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sun, 16 Jul 2000 23:26:45 +0200


After installing the current Python CVS, I tried to do

>>> from onlinehelp import help
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.0/onlinehelp.py", line 323, in ?
    help=Help(sys.stdout,24)
  File "/usr/local/lib/python2.0/onlinehelp.py", line 216, in __init__
    raise EnvironmentError, error
EnvironmentError: Cannot find documentation directory /usr/local/bin/doc. 
Set the PYTHONDOCS environment variable to point to a "doc" directory.
It should have a subdirectory "Lib" with a file named "index.html".

I was mainly interested in seeing the doc string retriever in real
life. To do so, I'm in the process of obtaining a set of html files
(hopefully typing make in the Doc directory will give me those).

Still, I think that module should work without HTML help installed,
and only fail if somebody tries to access the documentation. Or, there
should be a function doc() in addition to help() for retrieving and
printing doc strings.

I'd actually prefer the second option:

>>> doc(xml)
Core XML support for Python.

This package contains three sub-packages:

dom -- The W3C Document Object Model.  This supports DOM Level 1 +
       Namespaces.

parser -- Python wrappers for XML parsers (currently only supports Expat).

sax -- The Simple API for XML, developed by XML-Dev, led by David
       Megginson and ported to Python by Lars Marius Garshol.  This 
       supports the SAX 2 API.

should work even without any documentation installed. In any case, I
think this (or the help function) should be builtin.

Regards,
Martin