ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Tool_Box/apihelper.py
(Generate patch)

Comparing Python/NinoCode/Tool_Box/apihelper.py (file contents):
Revision 8 by ninoborges, Sat May 5 04:21:19 2012 UTC vs.
Revision 744 by nino.borges, Tue Apr 13 21:40:41 2021 UTC

# Line 9 | Line 9 | def help(object, spacing=10, collapse=1)
9      Takes module, class, list, dictionary, or string."""
10      methodList = [method for method in dir(object) if callable(getattr(object, method))]
11      processFunc = collapse and (lambda s: " ".join(s.split())) or (lambda s: s)
12 <    print "\n".join(["%s %s" %
12 >    print("\n".join(["%s %s" %
13                          (method.ljust(spacing),
14                          processFunc(str(getattr(object, method).__doc__)))
15 <                        for method in methodList])
15 >                        for method in methodList]))
16   if __name__ == "__main__":
17 <    print help.__doc__
17 >    print(help.__doc__)

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)