Given a string a the form 'package.module.Class', is there any simple way in Python to get the class object directly (assuming the module isn’t yet imported)?
If not, what is the cleanest way to separate the 'package.module' part from the 'Class' part, __import__() the module, and then get the class from that?
1 Answer