The package docs says pdoc is mostly a commandline tool and those were the only examples given. However, it was briefly mentioned that one could use pdoc.Module class or pdoc.html function but without much detail. I tried it and I got an error that pdoc was giving an unexpected argument to the markdown module, possibly due to changes in a newer version of Markdown?
Am I doing it wrong, is there a standard way of using pdoc from Python? There are many cases and for many users that running pdoc from within Python would be preferred.
>>> import pdoc
>>> pdoc.html("pyagg")
Traceback (most recent call last):
File "<pyshell#13>", line 1, in <module>
pdoc.html("pyagg")
File "C:\Python27\lib\site-packages\pdoc\__init__.py", line 270, in html
link_prefix=link_prefix, source=source)
File "C:\Python27\lib\site-packages\pdoc\__init__.py", line 675, in html
**kwargs)
File "C:\Python27\lib\site-packages\mako\template.py", line 443, in render
return runtime._render(self, self.callable_, args, data)
File "C:\Python27\lib\site-packages\mako\runtime.py", line 803, in _render
**_kwargs_for_callable(callable_, data))
File "C:\Python27\lib\site-packages\mako\runtime.py", line 835, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "C:\Python27\lib\site-packages\mako\runtime.py", line 860, in _exec_template
callable_(context, *args, **kwargs)
File "_html_mako", line 237, in render_body
File "_html_mako", line 37, in show_module
File "_html_mako", line 479, in render_show_module
File "_html_mako", line 110, in mark
File "C:\Python27\lib\site-packages\markdown\__init__.py", line 493, in markdown
File "C:\Python27\lib\site-packages\markdown\__init__.py", line 159, in __init__
File "C:\Python27\lib\site-packages\markdown\__init__.py", line 185, in registerExtensions
ext_args = ext_name[pos+1:-1]
File "C:\Python27\lib\site-packages\markdown\__init__.py", line 291, in build_extension
root = self.parser.parseDocument(self.lines).getroot()
TypeError: makeExtension() got an unexpected keyword argument 'linenums'