(module)
| 669 | return module, name |
| 670 | |
| 671 | def getmodule(module): |
| 672 | try: |
| 673 | return sys.modules[module] |
| 674 | except KeyError: |
| 675 | try: |
| 676 | with warnings.catch_warnings(): |
| 677 | action = 'always' if support.verbose else 'ignore' |
| 678 | warnings.simplefilter(action, DeprecationWarning) |
| 679 | __import__(module) |
| 680 | except AttributeError as exc: |
| 681 | if support.verbose: |
| 682 | print("Can't import module %r: %s" % (module, exc)) |
| 683 | raise ImportError |
| 684 | except ImportError as exc: |
| 685 | if support.verbose: |
| 686 | print(exc) |
| 687 | raise |
| 688 | return sys.modules[module] |
| 689 | |
| 690 | def getattribute(module, name): |
| 691 | obj = getmodule(module) |
no test coverage detected