MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / writedoc

Function writedoc

tools/python-3.11.9-amd64/Lib/pydoc.py:1880–1886  ·  view source on GitHub ↗

Write HTML documentation to a file in the current directory.

(thing, forceload=0)

Source from the content-addressed store, hash-verified

1878 output.write(s)
1879
1880def writedoc(thing, forceload=0):
1881 """Write HTML documentation to a file in the current directory."""
1882 object, name = resolve(thing, forceload)
1883 page = html.page(describe(object), html.document(object, name))
1884 with open(name + '.html', 'w', encoding='utf-8') as file:
1885 file.write(page)
1886 print('wrote', name + '.html')
1887
1888def writedocs(dir, pkgpath='', done=None):
1889 """Write out HTML documentation for all modules in a directory tree."""

Callers 2

writedocsFunction · 0.85
cliFunction · 0.85

Calls 7

describeFunction · 0.85
documentMethod · 0.80
resolveFunction · 0.70
openFunction · 0.70
printFunction · 0.50
pageMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected