def import_class(handler_class_path_string):
    sys.path.append( os.getcwd() )
    
    handler_class_path = handler_class_path_string.split(".")
    
    class_name = handler_class_path[-1]
    package_name = ".".join(handler_class_path[:-1])
    
    package = __import__(package_name, fromlist=[class_name])
    
    try:
        handler_class = getattr( package, class_name )
    except __HOLE__:
        raise AttributeError( "Can't find %s. Only %s"%(class_name, dir(package)) )
    
    return handler_class
dataset/ETHPy150Open bmander/graphserver/pygs/graphserver/ext/routeserver/routeserver.py/import_class