classification
Title: Pydocs module docs server not working on Windows.
Type: behavior Stage: resolved
Components: Installation, Library (Lib) Versions: Python 3.4, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Harlquinth, docs@python, georg.brandl, larry, loewis, ncoghlan, python-dev, terry.reedy
Priority: normal Keywords:

Created on 2012-04-05 17:07 by terry.reedy, last changed 2015-02-16 06:24 by berker.peksag. This issue is now closed.

Messages (10)
msg157606 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-04-05 17:07
3.2.3rc2 and 3.3.0a2, freshly downloaded and installed, Win7, 64 bit
Start Menue/Pythonxx/Module Docs
Brings up tkinter pydoc box.
[open browser] brings up *empty* localhost:7464 window.
Search 'tkinter' and double-click tkinter entry or select and [go to selected] opens empty localhost:7464/tkinter.html window.

This worked sometime last year on earlier 3.2, maybe on xp box.

I thought there might be an issue already, but I searched for 'pydoc' and 'modole docs' and found nothing.
msg157931 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2012-04-10 02:45
Hmm, we changed a few things with the way the back end server for pydoc works in 3.2. I didn't realise there was a Windows shortcut though, and I don't know how it gets generated. It sounds like it is still using the "-g" option, which is now deprecated.

If you run "pydoc -b" from a command line window, does that work correctly?

("-g" should still work as well, even though it's deprecated, but knowing whether or not "-b" is also broken may help diagnose the problem)
msg157936 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012-04-10 06:47
C:\Programs\Python32\Tools\Scripts>..\..\pythonw pydocgui.pyw -b
has the same behavior I described. So does -g.

The shortcut has been part of the Windows installation for many versions. It obviously uses pydocgui.py.

C:\Programs\Python32\Lib>pydoc.py -b
# starts one python.exe process
# prints on the next lines in the command window
Server ready at http://localhost:50695/
Server commands: [b]rowser, [q]uit
server>
# and opens blank localhost:50695 browser window
after asking for permission for python to access local network (which I gave). 'b' at prompt opens another blank window.

C:\Programs\Python32\Lib>pydoc.py -w difflib
#prints
wrote difflib.html
#which it did, looking as expected when opened in browser, with lots of cross-links.

So what it seems is not working in either case is opening the html page in the browser or connecting it to the server.

C:\Programs\Python32\Lib>webbrowser.py python.org
opens the page in *Internet Explorer* rather than Firefox (my default browser). pydoc tried to connect to the server in a new FF tab.

When I re-ran pydoc and tried to open localhost:50695 in IE, it gave me the result of a Bing search (one help forum post), so neither browser can find anything at that url.
msg209687 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-01-29 22:32
On current 3.3.4 and 3.4.0 start menus, clicking Module Docs does nothing that I can see except add a useless entry to the Frequent Programs list. 

I think the entry should be removed from the menu until it is made to work. All it does now is frustrate people and make Python look bad.
msg210145 - (view) Author: Harlquinth (Harlquinth) Date: 2014-02-03 15:53
We're also having the same issue here as well - I will delete the shortcut as a temporary fix!

Thanks, Hq.
msg212580 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-03-02 19:15
Nick: the menu entry currently launches tools\scripts\pydocgui.pyw, with no command line options.
msg212582 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-02 19:29
New changeset de81e0fe4905 by Martin v. Löwis in branch 'default':
Issue #14512: Launch pydoc -b instead of pydocgui.pyw on Windows.
http://hg.python.org/cpython/rev/de81e0fe4905
msg212584 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-03-02 19:34
cherry-picking request in Issue20834.

I will personally not backport this to 3.3.
msg212585 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-03-02 19:39
FTR: the server itself works fine for me. I don't see an empty window, but the proper library index. Terry, if the issue persists for you even after the change to pydoc -b, please submit *another* issue.
msg213806 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-17 06:30
New changeset fa34ea4e9e47 by Martin v. Löwis in branch '3.4':
Issue #14512: Launch pydoc -b instead of pydocgui.pyw on Windows.
http://hg.python.org/cpython/rev/fa34ea4e9e47
History
Date User Action Args
2015-02-16 06:24:00berker.peksagsetstage: needs patch -> resolved
2014-03-17 06:30:50python-devsetmessages: + msg213806
2014-03-02 19:39:43loewissetmessages: + msg212585
2014-03-02 19:34:35loewissetstatus: open -> closed
resolution: fixed
messages: + msg212584
2014-03-02 19:29:49python-devsetnosy: + python-dev
messages: + msg212582
2014-03-02 19:15:00loewissetmessages: + msg212580
2014-02-03 15:53:07Harlquinthsetnosy: + Harlquinth
messages: + msg210145
2014-01-29 22:32:38terry.reedysetnosy: + larry

messages: + msg209687
versions: + Python 3.4, - Python 3.2
2012-04-10 06:47:02terry.reedysetmessages: + msg157936
2012-04-10 02:45:33ncoghlansetnosy: + ncoghlan
messages: + msg157931

assignee: docs@python ->
components: - Documentation
2012-04-05 17:07:05terry.reedycreate