def for_name(modpath, classname):
    '''
    Returns a class of "classname" from module "modname".
    '''
    module = __import__(modpath, fromlist=[classname])
    classobj = getattr(module, classname)
    return classobj()
Returns a class of "classname" from module "modname".