PYTHONDOCS

J. D. Leach jdleach04 at sbcglobal.net
Mon Jan 2 17:33:24 CET 2006


Dan Sommers wrote:

> As a long shot, and I don't mean to insult anyone, but what is the name
> of your .bash profile, and are you sure it's executing?  My bash man
> page mentions a lot of profile files, none of which is called ".bash";
> bash seems to have a mind of its own when it comes to deciding which
> profile files to read at which times; and it's not uncommon to set a
> variable and not export it, which means that echo works but nothing else
> does.
> 
> Regards,
> Dan

Not insulted at all Dan, I used to think I was quite proficient at all
things digital in my youth, then age and numerous serious goofs and
oversights on my part humbled me. The profile doc in question is
named .bash_profile and now carries the following line:

PYTHONDOCS=/usr/share/doc/python-2.4/html; export PYTHONDOCS

To insure that my environment has indeed been altered, a quick command line
entry using env shows this to be the case:

...some entries
LANG=en_US
PYTHONSTARTUP=/etc/pythonrc.py
PYTHONDOCS=/usr/share/doc/python-2.4/html
LESSOPEN=|/usr/bin/lesspipe.sh %s
BROWSER=/usr/bin/www-browser
...more entries

The above is in accordance with all written documentation I have been able
to obtain, both within my local Python file directories, and those I've
found online. However, neither of my Python installations (2.4
in /usr/bin/, and 2.4.2 in /usr/local/bin/) recognize the existence of the
html docs. The following error from within the Python shell yields the same
result:

Python 2.4.2 (#1, Dec 25 2005, 23:06:12)
[GCC 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help('and')

Sorry, topic and keyword documentation is not available because the Python
HTML documentation files could not be found.  If you have installed them,
please set the environment variable PYTHONDOCS to indicate their location.

>>>

>From the command line, if I enter:

[jdleach at deepgray ~]$ pydoc if


The same error is raised. And this is where it gets really strange. If I
load pydoc from within eric3 (python IDE I use), I receive:

...
>>> pydoc - the Python documentation tool

pydoc.py <name> ...
    Show text documentation on something.  <name> may be the name of a...
...more info

Then when I enter the os.environ.get('PYTHONDOCS') method, the following is
produced:

>>> os.environ.get('PYTHONDOCS')
'/usr/share/doc/python-2.4/html'
>>> help('if')

...Sorry, topic and keyword blah, blah, blah. No inline info
available...blah, blah, bite me dolt...

I'm lost. Surely I've missed something simple.
Thank you for your time and sorry about the long post. I just wanted to
document in detail what is going on.

J. D. Leach



More information about the Python-list mailing list