diff options
Diffstat (limited to 'misc.py')
-rw-r--r-- | misc.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -0,0 +1,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) |