I want to know how to use variables for objects and function names in Python. In PHP, you can do this:
$className = \"MyClass\";
$newObject = new $className();
If you need to create a dynamic class in Python (i.e. one whose name is a variable) you can use type() which takes 3 params: name, bases, attrs
>>> class_name = 'MyClass'
>>> klass = type(class_name, (object,), {'msg': 'foobarbaz'})
>>> inst = klass()
>>> inst.msg
foobarbaz