MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / getClass

Function getClass

src/octoprint/util/__init__.py:50–59  ·  view source on GitHub ↗

Taken from http://stackoverflow.com/a/452981/2028598

(name)

Source from the content-addressed store, hash-verified

48
49
50def getClass(name):
51 """
52 Taken from http://stackoverflow.com/a/452981/2028598
53 """
54 parts = name.split(".")
55 module = ".".join(parts[:-1])
56 m = __import__(module)
57 for comp in parts[1:]:
58 m = getattr(m, comp)
59 return m
60
61
62def isDevVersion():

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected