aboutsummaryrefslogtreecommitdiff
path: root/misc.py
blob: 99fad74e0502fcc4a3aa60776dde60d43d6bfa63 (plain)
1
2
3
4
5
6
def import_class(cl):
    d = cl.rfind(".")
    classname = cl[d+1:len(cl)]
    m = __import__(cl[0:d], globals(), locals(), [classname])
    return getattr(m, classname)