MCPcopy Create free account
hub / github.com/Distrotech/reportlab / dumpDoc

Function dumpDoc

tools/docco/codegrab.py:188–214  ·  view source on GitHub ↗

Test support. Just prints docco on the module to standard output.

(modulename, directory=None)

Source from the content-addressed store, hash-verified

186
187
188def dumpDoc(modulename, directory=None):
189 """Test support. Just prints docco on the module
190 to standard output."""
191 docco = getObjectsDefinedIn(modulename, directory)
192 print 'codegrab.py - ReportLab Documentation Utility'
193 print 'documenting', modulename + '.py'
194 print '-------------------------------------------------------'
195 print
196 if docco.functions == []:
197 print 'No functions found'
198 else:
199 print 'Functions:'
200 for f in docco.functions:
201 print f.proto
202 print ' ' + f.doc
203
204 if docco.classes == []:
205 print 'No classes found'
206 else:
207 print 'Classes:'
208 for c in docco.classes:
209 print c.name
210 print ' ' + c.doc
211 for m in c.methods:
212 print m.proto # it is already indented in the file!
213 print ' ' + m.doc
214 print
215
216def test(m='reportlab.platypus.paragraph'):
217 dumpDoc(m)

Callers 1

testFunction · 0.85

Calls 1

getObjectsDefinedInFunction · 0.85

Tested by

no test coverage detected