def _get_attrdict(obj, basename, excluded=None):
    """
    get a dictionary of (basename-prefixed) attribute names/values,
    excluding the excluded names, internal stuff and callables.

    :param obj: the object to inspect
    :param basename: the prefix for the names in the result dictionary
    :param excluded: excluded attribute names, do not even touch [set or list]
    :return: dict names: values
    """
    if excluded is None:
        excluded = set()
    d = {}
    names = set(dir(obj)) - set(excluded)
    for name in names:
        if not name.startswith('_'):
            try:
                attr = getattr(obj, name)
                if not callable(attr):
                    d[basename + name] = attr
            except AttributeError:
                pass
    return d
