polishing for a demo

+ adopting additional requests

Change-Id: If5ca29b5d247f1bc429ca101b0081b1d14f6e6f1
This commit is contained in:
Enrico Faulhaber
2017-01-25 11:47:19 +01:00
parent d5e935788f
commit 6ec30e38e8
43 changed files with 828 additions and 578 deletions

View File

@ -19,7 +19,6 @@
# Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
#
# *****************************************************************************
"""Define helpers"""
import threading
@ -50,13 +49,16 @@ def get_class(spec):
modname, classname = spec.rsplit('.', 1)
import importlib
module = importlib.import_module('secop.' + modname)
# module = __import__(spec)
# module = __import__(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 = threading.Thread(
name='%s:%s' % (func.__module__, func.__name__),
target=func,
args=args,
kwargs=kwds)
t.daemon = True
t.start()
return t