1 """Module providing runtime utility objects to support the Micro/CircuitPython api"""
6 Object supporting CircuitPython-style of static symbols
7 as seen with Direction.OUTPUT, Pull.UP
12 Assumes instance will be found as attribute of own class.
13 Returns dot-subscripted path to instance
14 (assuming absolute import of containing package)
18 if getattr(cls, key) is self:
19 return "{}.{}.{}".format(cls.__module__, cls.__qualname__, key)
25 Inspects attributes of the class for instances of the class
26 and returns as key,value pairs mirroring dict#iteritems
29 val = getattr(cls, key)
38 def __exit__(self, exc_type, exc_value, traceback):
42 class Lockable(ContextManaged):
56 raise ValueError("Not locked")
60 from adafruit_blinka.agnostic import time
61 sys.modules['time'] = time