This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: keyword and topic help broken in Pythonwin IDE
Type: behavior Stage: test needed
Components: Documentation, Installation Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: JosephArmbruster, ajaksu2, bscrivener, georg.brandl, josiahcarlson, loewis, terry.reedy, zseil
Priority: normal Keywords:

Created on 2006-05-15 18:46 by bscrivener, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (19)
msg28543 - (view) Author: BartlebyScrivener (bscrivener) Date: 2006-05-15 18:46
Using ActivePython 2.4.3 on Windows XP

While in the Pythonwin IDE, if I seek keyword help by
issuing the following command:

>>>help ('while')

I get:

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.

My PYTHONDOCS variable is set to:

c:\python24\Doc\Python-Docs-2.4.2\ref

which appears to be correct (ie the help html files are
installed
there).

Searching this group, I found someone else complaining
about the same behavior with no clear resolution.

http://tinyurl.com/pblev

See also

http://tinyurl.com/mbokp
msg28544 - (view) Author: Josiah Carlson (josiahcarlson) * (Python triager) Date: 2006-05-20 07:00
Logged In: YES 
user_id=341410

Since you are using the Pythonwin IDE, which was written and
is supported by Mark Hammond via the pywin32 project,
perhaps you should be visiting his project page instead:
http://sf.net/projects/pywin32
msg28545 - (view) Author: BartlebyScrivener (bscrivener) Date: 2006-05-21 00:51
Logged In: YES 
user_id=1523094

help('topic') or help('keyword') doesn't work in IDLE or
Pythonwin IDE

msg28546 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-05-29 21:00
Logged In: YES 
user_id=849994

Closing as 3rd party.
msg28547 - (view) Author: BartlebyScrivener (bscrivener) Date: 2006-05-29 22:19
Logged In: YES 
user_id=1523094

Sorry, if I was unclear. IDLE is not third party, is it?

So I'm saying that on Windows XP, using the install from
Python.org help() is BROKEN. Search in the Python Google
group and you'll find many other references to same. Pydoc
no longer  provides help on topic or keywords. It will do
modules. In short it's PYDOC that is broken, not Pythonwin IDE.

Thanks,

rick
msg28548 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-05-29 22:24
Logged In: YES 
user_id=849994

Okay, reopening.
msg28549 - (view) Author: Josiah Carlson (josiahcarlson) * (Python triager) Date: 2006-05-29 22:30
Logged In: YES 
user_id=341410

From what I understand, HTML help hasn't shipped with Python
on Windows for a few releases (likely around the time that
.chm help files started shipping).

If you've got html help files installed, and it's still not
picking them up, could you dig deeper into why this is the case.
msg28550 - (view) Author: Ziga Seilnacht (zseil) * (Python committer) Date: 2006-05-30 00:42
Logged In: YES 
user_id=1326842

The problem is on your side.
You should set the PYTHONDOCS environment variable
to the root directory of the html documentation, eg.:

PYTHONDOCS=c:\python24\Doc\Python-Docs-2.4.2

and not:

PYTHONDOCS=c:\python24\Doc\Python-Docs-2.4.2\ref
msg28551 - (view) Author: BartlebyScrivener (bscrivener) Date: 2006-05-30 00:45
Logged In: YES 
user_id=1523094

>> From what I understand, HTML help hasn't shipped with
>> Python on Windows for a few releases (likely around the
>> time that .chm help files started shipping).

The two tiny urls, esp. the second one illuminate just where
the bug is in Pydoc, but the fix recommended by the poster
doesn't work. The problem happens even after downloading
html help and pointing pydoc to it in the Pythondocs
environment variable. I don't know enough to explore
further, which is why I need a nice working help function :)
I would think this would be an urgent fix for Python
evangelism.  rd
msg28552 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-06-04 20:20
Logged In: YES 
user_id=21627

bscrivener, please run

hh -decompile c:\python24\doc\html c:\python24\Doc\python24.chm

and report whether that fixes the problem.
msg28553 - (view) Author: BartlebyScrivener (bscrivener) Date: 2006-06-04 20:39
Logged In: YES 
user_id=1523094

>> bscrivener, please run

>> hh -decompile c:\python24\doc\html
c:\python24\Doc\python24.chm

>> and report whether that fixes the problem.

Fixed! Thank you. I'll share with comp.lang.python next time
somebody else has the same problem. 

Thank you, loewis!
msg57616 - (view) Author: Joseph Armbruster (JosephArmbruster) Date: 2007-11-18 14:17
Is there any reason this is not part of the windows installer?  So, that
if you select to install the full Documentation feature, this as a
checkbox-type option to 'build html documentation'?

Thoughts?
msg57618 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-11-18 17:44
The reason this is not part of the Windows installer is twofold:
a) nobody ever thought of making it so, ever since the htmlhelp was
added, and
b) no code was contributed to add such a procedure to the Windows installer.

Contributions are welcome, although I would prefer a way to open
htmlhelp from IDLE, rather than more-than-doubling the size of the
installed documentation.
msg66968 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2008-05-16 22:20
Py3.0a5 installed in C;/Program Files/

Start/Python30/Python Manuals, using Python30.chm, works great.  Thank
you for that.  In the interpreter (and IDLE) help(object) works fine. 
Ditto.  But for topics and keywords, I got the same message as the OP.

Opinion: After 2 years, I think the priority of this issue should be
raised: help should 'just work' as installed, especially on Windows. 
Until is does, the instructions need to be improved so that normal users
 and Python beginners, and not just DOS/Windows experts, can fix it.

The instruction '''
On the Microsoft Windows operating system, the files can be built by
running "hh -decompile . PythonNN.chm" in the C:\PythonNN\Doc>
directory.''' makes several assumptions about knowledge that many do not
have.  Since a running Python knows its version and starting location,
it should make the implied substitutions itself.

With that done, here are two possible interpretations of 'run... in..." 

1. '''Open Start/Run, enter "hh -decompile . C:/Program
Files/Python30/Doc/Python30.chm" in the box, and click OK'''.
[Since I did not try this, I do not really know if this will put the
result in the right place.]

2. '''Open Start/All programs/Accessories/Command Prompt, enter "cd
C:/Program Files/Python30/Doc", enter "dir" to check that Python30.chm
is present, enter "hh -decompile . Python30.chm", and enter "dir' again
and you should see several new files and directories.'''

I suspect that very few of additions are needed by help() for topics and
keywords.  If I am correct, then instead of a complete decompile,...

Suggestion 1a (permanent): When installing on Windows, include in /Doc
the minimum html files needed by help() so no decompile is needed.
Suggestion 1b (interim): expand instructions as indicated above.

After closing and restarting Python, I still got the same error message.
  I assumed "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." indicated the problem.  But what
should one do with more than one version of Python present, which is or
will be normal for most who install 3.0.

Suggeston 2a (permanent): help should just look in the default location
for the version it is running on.  Or it should set its own copy on
first use.  Or the interpreter should.

Suggestion 2b (interim): give details on how to set an e.v.  Python is
the first Windows XP program I can remember that asked me to do this.

XP procedure: To set for all users, switch to admin account. Open
Start/Control Panel/System.  Click Advanced tab and Environment
Variables button.  For all users, add a System variable.  Otherwise, add
a User variable.  In either case, set PYTHONDOCS to "C:\Program
Files\Python30\Doc"

However, after I did this, I restarted Python, and listed
os.environ.items() to verify ('PYTHONDOCS', 'C:\\Program
Files\\Python30\\Doc').  However help still does not work.  ?????
msg66971 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-05-16 22:36
> Opinion: After 2 years, I think the priority of this issue should be
> raised: help should 'just work' as installed, especially on Windows. 
> Until is does, the instructions need to be improved so that normal users
>  and Python beginners, and not just DOS/Windows experts, can fix it.

Counter-opinion: contributions are welcome. Raising the priority does
NOTHING to accelerate the processing. The effecting of raisig it a
little is zero; the effect of raising it much is that it gets lowered
if it remains unresolved an a release approaches.

> However, after I did this, I restarted Python, and listed
> os.environ.items() to verify ('PYTHONDOCS', 'C:\\Program
> Files\\Python30\\Doc').  However help still does not work.  ?????

Without checking: it's most likely that the actual HTML file names
have changed in 2.6, so that the interactive invocation of HTML
pages would work on no system. Either you provide a fix, or it remains
unfixed until somebody provides a fix.

Unassigning myself, as I will have no time to work on this in the
coming months.
msg86613 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-04-26 22:11
Would adding a .bat file to run "hh -decompile" be acceptable?
msg86644 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2009-04-27 05:08
> Would adding a .bat file to run "hh -decompile" be acceptable?

I don't quite understand the proposed solution: Would you merely
add the batch file, or would you also run it automatically? If
so, at what point? If you run it automatically, you also need to
provide a mechanism to remove all these files on uninstallation.
msg89373 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2009-06-14 22:23
Something changed in the past year so that keyword and topic help work
in 3.2rc2 at both the main prompt and help prompt.  Thanks to whoever.
If this is also fixed in 2.6.2 or even 2.6 in SVN, this can be closed.

>>> help('while')
The ``while`` statement...
...
>>> help('ASSERTION')
The ``assert`` statement...
...
help> while
The ``while`` statement
...
help> ASSERTION
The ``assert`` statement
msg89386 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-06-15 04:44
Very good :)
History
Date User Action Args
2022-04-11 14:56:17adminsetgithub: 43364
2009-06-15 04:44:07georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg89386
2009-06-14 22:23:28terry.reedysetmessages: + msg89373
versions: - Python 3.1
2009-04-27 05:08:19loewissetmessages: + msg86644
2009-04-26 22:11:36ajaksu2setassignee: georg.brandl
type: behavior
components: + Documentation, Installation, - Windows
versions: + Python 2.6, Python 3.1
nosy: + ajaksu2

messages: + msg86613
stage: test needed
2008-05-16 22:37:16loewissetassignee: loewis -> (no value)
2008-05-16 22:36:47loewissetmessages: + msg66971
2008-05-16 22:20:30terry.reedysetnosy: + terry.reedy
messages: + msg66968
2007-11-18 17:44:10loewissetmessages: + msg57618
2007-11-18 14:17:12JosephArmbrustersetnosy: + JosephArmbruster
messages: + msg57616
2006-05-15 18:46:50bscrivenercreate