Provide basic client Object
also improve the describing data and core params Change-Id: I645444f2a618fdfd40a729e1007c58def24d5ffb
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
|
||||
"""Define helpers"""
|
||||
|
||||
import threading
|
||||
|
||||
class attrdict(dict):
|
||||
"""a normal dict, providing access also via attributes"""
|
||||
@ -52,6 +53,13 @@ def get_class(spec):
|
||||
return getattr(module, classname)
|
||||
|
||||
|
||||
def mkthread(func, *args, **kwds):
|
||||
t = threading.Thread(name='%s:%s' % (func.__module__, func.__name__),
|
||||
target=func, args=args, kwargs=kwds)
|
||||
t.daemon = True
|
||||
t.start()
|
||||
return t
|
||||
|
||||
if __name__ == '__main__':
|
||||
print "minimal testing: lib"
|
||||
d = attrdict(a=1, b=2)
|
||||
|
Reference in New Issue
Block a user