[issue902061] pydoc insists upon producing file: URLs

René Liebscher report at bugs.python.org
Wed Oct 29 19:06:42 CET 2008


René Liebscher <R.Liebscher at gmx.de> added the comment:

I would like to see this change introducing a method of class HTMLDoc.

It has already some such methods as:

    def namelink(self, name, *dicts):
    def classlink(self, object, modname):
    def modulelink(self, object):
    def modpkglink(self, data):

So it would be logically to make it a method 
 
    def filelink(self,url,path):
         """Make a link to source file."""
         return '<a href="file:%s">%s</a>' % (url, path)
 
and changing the creating of the filelink to
...
            filelink = self.filelink(url, path)
         except TypeError:
            filelink = '(built-in)'
...

This way one can easily subclass HTMLDoc for own purposes and define a
own filelink method.

----------
nosy: +r.liebscher

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue902061>
_______________________________________


More information about the Python-bugs-list mailing list