`module_name, class_name = class_path.rsplit('.', 1)` perhaps?