#NEWLINE# def load_class( full_class_string ) : #NEWLINE# #INDENT# '\n    dynamically load a class from a string\n\n    http://thomassileo.com/blog/2012/12/21/dynamically-load-python-modules-or-classes/\n    ' #NEWLINE# class_parts = full_class_string . split ( '.' ) #NEWLINE# module_path = '.' . join ( class_parts [ : ( - 1 ) ] ) #NEWLINE# class_name = module [ ( - 1 ) ] #NEWLINE# module = importlib . import_module ( module_path ) #NEWLINE# return getattr ( module , class_name )