Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyword and topic help broken in Pythonwin IDE #43364

Closed
bscrivener mannequin opened this issue May 15, 2006 · 19 comments
Closed

keyword and topic help broken in Pythonwin IDE #43364

bscrivener mannequin opened this issue May 15, 2006 · 19 comments
Assignees
Labels
docs Documentation in the Doc dir topic-installation type-bug An unexpected behavior, bug, or error

Comments

@bscrivener
Copy link
Mannequin

bscrivener mannequin commented May 15, 2006

BPO 1489051
Nosy @loewis, @birkenfeld, @terryjreedy, @josiahcarlson, @devdanzin

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2009-06-15.04:44:07.952>
created_at = <Date 2006-05-15.18:46:50.000>
labels = ['type-bug', 'expert-installation', 'docs']
title = 'keyword and topic help broken in Pythonwin IDE'
updated_at = <Date 2009-06-15.04:44:07.894>
user = 'https://bugs.python.org/bscrivener'

bugs.python.org fields:

activity = <Date 2009-06-15.04:44:07.894>
actor = 'georg.brandl'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2009-06-15.04:44:07.952>
closer = 'georg.brandl'
components = ['Documentation', 'Installation']
creation = <Date 2006-05-15.18:46:50.000>
creator = 'bscrivener'
dependencies = []
files = []
hgrepos = []
issue_num = 1489051
keywords = []
message_count = 19.0
messages = ['28543', '28544', '28545', '28546', '28547', '28548', '28549', '28550', '28551', '28552', '28553', '57616', '57618', '66968', '66971', '86613', '86644', '89373', '89386']
nosy_count = 8.0
nosy_names = ['loewis', 'georg.brandl', 'terry.reedy', 'josiahcarlson', 'zseil', 'bscrivener', 'ajaksu2', 'JosephArmbruster']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'test needed'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue1489051'
versions = ['Python 2.6']

@bscrivener
Copy link
Mannequin Author

bscrivener mannequin commented May 15, 2006

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

@bscrivener bscrivener mannequin assigned loewis May 15, 2006
@bscrivener bscrivener mannequin added the OS-windows label May 15, 2006
@bscrivener bscrivener mannequin assigned loewis May 15, 2006
@bscrivener bscrivener mannequin added the OS-windows label May 15, 2006
@josiahcarlson
Copy link
Mannequin

josiahcarlson mannequin commented May 20, 2006

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

@bscrivener
Copy link
Mannequin Author

bscrivener mannequin commented May 21, 2006

Logged In: YES
user_id=1523094

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

@birkenfeld
Copy link
Member

Logged In: YES
user_id=849994

Closing as 3rd party.

@bscrivener
Copy link
Mannequin Author

bscrivener mannequin commented May 29, 2006

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

@birkenfeld
Copy link
Member

Logged In: YES
user_id=849994

Okay, reopening.

@josiahcarlson
Copy link
Mannequin

josiahcarlson mannequin commented May 29, 2006

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.

@zseil
Copy link
Mannequin

zseil mannequin commented May 30, 2006

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

@bscrivener
Copy link
Mannequin Author

bscrivener mannequin commented May 30, 2006

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

@loewis
Copy link
Mannequin

loewis mannequin commented Jun 4, 2006

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.

@bscrivener
Copy link
Mannequin Author

bscrivener mannequin commented Jun 4, 2006

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!

@JosephArmbruster
Copy link
Mannequin

JosephArmbruster mannequin commented Nov 18, 2007

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?

@loewis
Copy link
Mannequin

loewis mannequin commented Nov 18, 2007

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.

@terryjreedy
Copy link
Member

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. ?????

@loewis
Copy link
Mannequin

loewis mannequin commented May 16, 2008

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.

@loewis loewis mannequin unassigned loewis May 16, 2008
@devdanzin
Copy link
Mannequin

devdanzin mannequin commented Apr 26, 2009

Would adding a .bat file to run "hh -decompile" be acceptable?

@devdanzin devdanzin mannequin added docs Documentation in the Doc dir topic-installation and removed OS-windows labels Apr 26, 2009
@devdanzin devdanzin mannequin assigned birkenfeld Apr 26, 2009
@devdanzin devdanzin mannequin added type-bug An unexpected behavior, bug, or error docs Documentation in the Doc dir topic-installation and removed OS-windows labels Apr 26, 2009
@devdanzin devdanzin mannequin assigned birkenfeld Apr 26, 2009
@devdanzin devdanzin mannequin added the type-bug An unexpected behavior, bug, or error label Apr 26, 2009
@loewis
Copy link
Mannequin

loewis mannequin commented Apr 27, 2009

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.

@terryjreedy
Copy link
Member

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

@birkenfeld
Copy link
Member

Very good :)

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-installation type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants