[Python-checkins] CVS: python/dist/src/Lib pydoc.py,1.48,1.49
Tim Peters
tim_one@users.sourceforge.net
Mon, 24 Sep 2001 20:18:34 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv1374/python/Lib
Modified Files:
pydoc.py
Log Message:
+ Got rid of all instances of <small>. Under IE5, GUI-mode pydoc has
always been close to useless, because the <small>-ified docstrings
were too small to read, even after cranking up my default font size
just for pydoc. Now it reads fine under my defaults (as does most
of the web <0.5 wink>). If it's thought important to play tricks
with font size, tough, then someone should rework pydoc to use style
sheets, and (more) predictable percentage-of-default size controls.
+ Tried to ensure that all <dt> and <dd> tags are closed. I've read (but
don't know) that some browsers get confused if they're not, and esp.
when style sheets are in use too.
Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** pydoc.py 2001/09/25 00:01:06 1.48
--- pydoc.py 2001/09/25 03:18:32 1.49
***************
*** 349,354 ****
<table width="100%%" cellspacing=0 cellpadding=2 border=0>
<tr bgcolor="%s">
! <td valign=bottom><small> <br></small
! ><font color="%s" face="helvetica, arial"> <br>%s</font></td
><td align=right valign=bottom
><font color="%s" face="helvetica, arial">%s</font></td></tr></table>
--- 349,354 ----
<table width="100%%" cellspacing=0 cellpadding=2 border=0>
<tr bgcolor="%s">
! <td valign=bottom> <br>
! <font color="%s" face="helvetica, arial"> <br>%s</font></td
><td align=right valign=bottom
><font color="%s" face="helvetica, arial">%s</font></td></tr></table>
***************
*** 363,368 ****
<p><table width="100%%" cellspacing=0 cellpadding=2 border=0>
<tr bgcolor="%s">
! <td colspan=3 valign=bottom><small><small> <br></small></small
! ><font color="%s" face="helvetica, arial">%s</font></td></tr>
''' % (bgcol, fgcol, title)
if prelude:
--- 363,368 ----
<p><table width="100%%" cellspacing=0 cellpadding=2 border=0>
<tr bgcolor="%s">
! <td colspan=3 valign=bottom> <br>
! <font color="%s" face="helvetica, arial">%s</font></td></tr>
''' % (bgcol, fgcol, title)
if prelude:
***************
*** 400,404 ****
return '<table width="100%%"><tr>%s</tr></table>' % result
- def small(self, text): return '<small>%s</small>' % text
def grey(self, text): return '<font color="#909090">%s</font>' % text
--- 400,403 ----
***************
*** 479,483 ****
if type(entry) is type(()):
c, bases = entry
! result = result + '<dt><font face="helvetica, arial"><small>'
result = result + self.classlink(c, modname)
if bases and bases != (parent,):
--- 478,482 ----
if type(entry) is type(()):
c, bases = entry
! result = result + '<dt><font face="helvetica, arial">'
result = result + self.classlink(c, modname)
if bases and bases != (parent,):
***************
*** 486,490 ****
parents.append(self.classlink(base, modname))
result = result + '(' + join(parents, ', ') + ')'
! result = result + '\n</small></font></dt>'
elif type(entry) is type([]):
result = result + '<dd>\n%s</dd>\n' % self.formattree(
--- 485,489 ----
parents.append(self.classlink(base, modname))
result = result + '(' + join(parents, ', ') + ')'
! result = result + '\n</font></dt>'
elif type(entry) is type([]):
result = result + '<dd>\n%s</dd>\n' % self.formattree(
***************
*** 553,557 ****
doc = self.markup(getdoc(object), self.preformat, fdict, cdict)
doc = doc and '<tt>%s</tt>' % doc
! result = result + '<p>%s</p>\n' % self.small(doc)
if hasattr(object, '__path__'):
--- 552,556 ----
doc = self.markup(getdoc(object), self.preformat, fdict, cdict)
doc = doc and '<tt>%s</tt>' % doc
! result = result + '<p>%s</p>\n' % doc
if hasattr(object, '__path__'):
***************
*** 647,651 ****
doc = self.markup(value.__doc__, self.preformat,
funcs, classes, mdict)
! push('<dd><small><tt>%s</tt></small></dd>\n' % doc)
for attr, tag in [("fset", " setter"),
("fget", " getter"),
--- 646,650 ----
doc = self.markup(value.__doc__, self.preformat,
funcs, classes, mdict)
! push('<dd><tt>%s</tt></dd>\n' % doc)
for attr, tag in [("fset", " setter"),
("fget", " getter"),
***************
*** 672,676 ****
doc = self.markup(getdoc(value), self.preformat,
funcs, classes, mdict)
! doc = '<dd>' + self.small('<tt>%s</tt>' % doc)
push('<dl><dt>%s%s</dl>\n' % (base, doc))
push('\n')
--- 671,675 ----
doc = self.markup(getdoc(value), self.preformat,
funcs, classes, mdict)
! doc = '<dd><tt>%s</tt>' % doc
push('<dl><dt>%s%s</dl>\n' % (base, doc))
push('\n')
***************
*** 738,750 ****
parents.append(self.classlink(base, object.__module__))
title = title + '(%s)' % join(parents, ', ')
! doc = self.markup(
! getdoc(object), self.preformat, funcs, classes, mdict)
! doc = self.small(doc and '<tt>%s<br> </tt>' % doc or
! self.small(' '))
return self.section(title, '#000000', '#ffc8d8', contents, 5, doc)
def formatvalue(self, object):
"""Format an argument default value as text."""
! return self.small(self.grey('=' + self.repr(object)))
def docroutine(self, object, name=None, mod=None,
--- 737,747 ----
parents.append(self.classlink(base, object.__module__))
title = title + '(%s)' % join(parents, ', ')
! doc = self.markup(getdoc(object), self.preformat, funcs, classes, mdict)
! doc = doc and '<tt>%s<br> </tt>' % doc or ' '
return self.section(title, '#000000', '#ffc8d8', contents, 5, doc)
def formatvalue(self, object):
"""Format an argument default value as text."""
! return self.grey('=' + self.repr(object))
def docroutine(self, object, name=None, mod=None,
***************
*** 792,805 ****
argspec = '(...)'
! decl = title + argspec + (note and self.small(self.grey(
! '<font face="helvetica, arial">%s</font>' % note)))
if skipdocs:
! return '<dl><dt>%s</dl>\n' % decl
else:
doc = self.markup(
getdoc(object), self.preformat, funcs, classes, methods)
! doc = doc and '<dd>' + self.small('<tt>%s</tt>' % doc)
! return '<dl><dt>%s%s</dl>\n' % (decl, doc)
def docother(self, object, name=None, mod=None):
--- 789,802 ----
argspec = '(...)'
! decl = title + argspec + (note and self.grey(
! '<font face="helvetica, arial">%s</font>' % note))
if skipdocs:
! return '<dl><dt>%s</dt></dl>\n' % decl
else:
doc = self.markup(
getdoc(object), self.preformat, funcs, classes, methods)
! doc = doc and '<dd><tt>%s</tt></dd>' % doc
! return '<dl><dt>%s</dt>%s</dl>\n' % (decl, doc)
def docother(self, object, name=None, mod=None):
***************
*** 1802,1807 ****
indices.append(html.index(dir, seen))
contents = heading + join(indices) + '''<p align=right>
! <small><small><font color="#909090" face="helvetica, arial"><strong>
! pydoc</strong> by Ka-Ping Yee <ping@lfw.org></font></small></small>'''
self.send_document('Index of Modules', contents)
--- 1799,1804 ----
indices.append(html.index(dir, seen))
contents = heading + join(indices) + '''<p align=right>
! <font color="#909090" face="helvetica, arial"><strong>
! pydoc</strong> by Ka-Ping Yee <ping@lfw.org></font>'''
self.send_document('Index of Modules', contents)