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.

Author torsten
Recipients torsten
Date 2010-06-14.09:13:51
SpamBayes Score 0.0007487739
Marked as misclassified No
Message-id <1276506836.98.0.338188119331.issue8994@psf.upfronthosting.co.za>
In-reply-to
Content
With the attached file doc.py I see the following behaviour:

torsten@ddhp3:~$ pydoc doc
Traceback (most recent call last):
  File "/usr/bin/pydoc", line 5, in <module>
    pydoc.cli()
  File "/usr/lib/python2.6/pydoc.py", line 2309, in cli
    help.help(arg)
  File "/usr/lib/python2.6/pydoc.py", line 1773, in help
    elif request: doc(request, 'Help on %s:')
  File "/usr/lib/python2.6/pydoc.py", line 1516, in doc
    pager(render_doc(thing, title, forceload))
  File "/usr/lib/python2.6/pydoc.py", line 1323, in pager
    pager(text)
  File "/usr/lib/python2.6/pydoc.py", line 1343, in <lambda>
    return lambda text: pipepager(text, 'less')
  File "/usr/lib/python2.6/pydoc.py", line 1364, in pipepager
    pipe.write(text)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 184-186: ordinal not in range(128)

With the terminal on sys.stdout I get "UTF-8" as the encoding (sys.stdout.encoding), therefore I would expect this to work. It would be helpful to have an option to set the encoding when running pydoc as well.

And, of course, accessing the documentation via a web browser (pydoc -p 8000, firefox http://localhost:8000) I get a blank screen for the doc.py example. And a backtrace on the terminal where I started pydoc.
History
Date User Action Args
2010-06-14 09:13:57torstensetrecipients: + torsten
2010-06-14 09:13:56torstensetmessageid: <1276506836.98.0.338188119331.issue8994@psf.upfronthosting.co.za>
2010-06-14 09:13:54torstenlinkissue8994 messages
2010-06-14 09:13:52torstencreate