Activate the viewcode extension in the automatically generated apidoc project.

This commit is contained in:
Georg Brandl 2011-10-07 19:17:48 +02:00
parent 38ebe67c4e
commit be5dac74a3
2 changed files with 2 additions and 0 deletions

View File

@ -301,6 +301,7 @@ Note: By default this script will not overwrite already created files.""")
master = 'index',
epub = True,
ext_autodoc = True,
ext_viewcode = True,
makefile = True,
batchfile = True,
mastertocmaxdepth = opts.maxdepth,

View File

@ -217,6 +217,7 @@ class ModuleAnalyzer(object):
pos = self.source.tell()
if not decoded:
self.encoding = detect_encoding(self.source.readline)
self.source.seek(pos)
self.code = self.source.read().decode(self.encoding)
self.source.seek(pos)
self.source = TextIOWrapper(self.source, self.encoding)