Given an object or a path to an object, get the object and its name.
(thing, forceload=0)
| 1696 | html = HTMLDoc() |
| 1697 | |
| 1698 | def resolve(thing, forceload=0): |
| 1699 | """Given an object or a path to an object, get the object and its name.""" |
| 1700 | if isinstance(thing, str): |
| 1701 | object = locate(thing, forceload) |
| 1702 | if object is None: |
| 1703 | raise ImportError('''\ |
| 1704 | No Python documentation found for %r. |
| 1705 | Use help() to get the interactive help utility. |
| 1706 | Use help(str) for help on the str class.''' % thing) |
| 1707 | return object, thing |
| 1708 | else: |
| 1709 | name = getattr(thing, '__name__', None) |
| 1710 | return thing, name if isinstance(name, str) else None |
| 1711 | |
| 1712 | def render_doc(thing, title='Python Library Documentation: %s', forceload=0, |
| 1713 | renderer=None): |
no test coverage detected
searching dependent graphs…