In Python 3 on Windows, pydoc fails to display source file listings in the browser. To reproduce in Python 3.4: 1. start pydoc: python -m pydoc -p 8888 2. Navigate to the url: http://127.0.0.1:8888/getfile?key=///C:/python34/lib/pydoc.py The error message: getfile?key=///C:/python34/lib/pydoc.py FileNotFoundError: [Errno 2] No such file or directory: '///C:/python34/lib/pydoc.py' The url passed to html_getfile needs to be converted into a NT pathname.
Fixed, thanks for the report! I took an alternate approach to fixing the problem; nturl2path was only used at all because pydoc used to produce actual "file://" links rather than rendering the page itself, and there's no reason to use nturl2path if you're not making a "file://" link.