MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _resolve

Function _resolve

tools/python-3.11.9-amd64/Lib/logging/config.py:96–108  ·  view source on GitHub ↗

Resolve a dotted name to a global object.

(name)

Source from the content-addressed store, hash-verified

94
95
96def _resolve(name):
97 """Resolve a dotted name to a global object."""
98 name = name.split('.')
99 used = name.pop(0)
100 found = __import__(used)
101 for n in name:
102 used = used + '.' + n
103 try:
104 found = getattr(found, n)
105 except AttributeError:
106 __import__(used)
107 found = getattr(found, n)
108 return found
109
110def _strip_spaces(alist):
111 return map(str.strip, alist)

Callers 3

_create_formattersFunction · 0.85
_install_handlersFunction · 0.85
configure_formatterMethod · 0.85

Calls 3

__import__Function · 0.85
splitMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected