(name)
| 51 | |
| 52 | |
| 53 | def main(name): |
| 54 | module_name, cls_name = parse(name) |
| 55 | try: |
| 56 | cls = getattr(import_module(module_name), cls_name) |
| 57 | except ModuleNotFoundError: |
| 58 | print(f'*** Could not import {module_name!r}.') |
| 59 | except AttributeError: |
| 60 | print(f'*** {cls_name!r} not found in {module_name!r}.') |
| 61 | else: |
| 62 | if isinstance(cls, type): |
| 63 | draw(cls) |
| 64 | else: |
| 65 | print(f'*** {cls_name!r} is not a class.') |
| 66 | |
| 67 | |
| 68 | if __name__ == '__main__': |