def from_module_import_class(modulename, classname):
 klass = getattr(__import__(modulename, globals(), locals(), [classname], (-1)), classname)
 globals()[classname] = klass

def from_module_import_class ( modulename , classname ) : klass = getattr ( __import__ ( modulename , globals ( ) , locals ( ) , [ classname ] , ( - 1 ) ) , classname ) globals ( ) [ classname ] = klass
import a class from a module .