def import_to_python(import_str):
    """Given a string 'a.b.c' return object c from a.b module."""
    mod_name, obj_name = import_str.rsplit('.', 1)
    mod = __import__(mod_name, {}, {}, [''])
    #print mod_name, obj_name, mod, dir(mod)
    obj = getattr(mod, obj_name)
    return obj