| 293 | |
| 294 | company_parser = parser.Parser('{_}:company:{:s}', parser.M) |
| 295 | def list_drivers(key, module): |
| 296 | buf = StringIO() |
| 297 | for element in dir(module): |
| 298 | if element.startswith('_'): |
| 299 | continue |
| 300 | el = getattr(module, element) |
| 301 | if isinstance(el, type) and issubclass(el, Driver): |
| 302 | print('Driver found: {}.{}'.format(key,element)) |
| 303 | doc1 = (el.__doc__ or element).split('\n')[0].strip() |
| 304 | buf.write('- :class:`{} <{}.{}>`\n'.format(doc1, key, element)) |
| 305 | return buf.getvalue() |
| 306 | |
| 307 | def list_packages(root_package): |
| 308 | packages = {} |