diff options
author | Georg Brandl <georg@python.org> | 2008-01-19 20:44:32 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-01-19 20:44:32 (GMT) |
commit | 825fc8bedeab69b7cf02291fd844a5faef64f167 (patch) | |
tree | a4682b070c46379b0cb1981d3734f6727c2fe12c /Lib | |
parent | fceab5a385f121029bfa7e855f7fd1aca1eb8c3f (diff) | |
download | cpython-825fc8bedeab69b7cf02291fd844a5faef64f167.zip cpython-825fc8bedeab69b7cf02291fd844a5faef64f167.tar.gz cpython-825fc8bedeab69b7cf02291fd844a5faef64f167.tar.bz2 |
#1867: fix a few 3.0 incompatibilities in pydoc.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/pydoc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 5d764eb..2a1e98f 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1946,9 +1946,9 @@ def serve(port, callback=None, completer=None): def send_document(self, title, contents): try: self.send_response(200) - self.send_header('Content-Type', 'text/html') + self.send_header('Content-Type', 'text/html; charset=UTF-8') self.end_headers() - self.wfile.write(html.page(title, contents)) + self.wfile.write(html.page(title, contents).encode('utf-8')) except IOError: pass def do_GET(self): @@ -1974,7 +1974,7 @@ def serve(port, callback=None, completer=None): return '<a href="%s.html">%s</a>' % (name, name) names = filter(lambda x: x != '__main__', sys.builtin_module_names) - contents = html.multicolumn(names, bltinlink) + contents = html.multicolumn(list(names), bltinlink) indices = ['<p>' + html.bigsection( 'Built-in Modules', '#ffffff', '#ee77aa', contents)] |