Ran into this bit of genius code in the python mailing list. Here's the code for now and I'll explain it later:
def forname(modname, classname):
''' Returns a class of "classname" from module "modname". '''
module = __import__(modname)
classobj = getattr(module, classname)
return classobj
Basically it returns a class ...
read moreThere are comments.