I have list of class names and want to create their instances dynamically. for example:
names=[ \'foo.baa.a\', \'foo.daa.c\', \'foo.AA\', .... ] def save(c
You can use the python builtin eval() statement to instantiate your classes. Like this:
eval()
aa = eval(cName)()
Notice!
using eval is dangerous and is a key for lots of security risks based on code injections.