import types


def className(obj, addPrefix=False):
    """Return human-readable string of class name."""
    if isinstance(obj, str):
        class_str = obj
        # don't add prefix -- it's unknown
        prefix = ""
    elif isinstance(obj, type):
        class_str = obj.__name__
        if addPrefix:
            prefix = "Class "
        else:
            prefix = ""
    elif isinstance(obj, types.ModuleType):
        class_str = obj.__name__
        if addPrefix:
            prefix = "Module "
        else:
            prefix = ""
    else:
        try:
            class_str = obj.__class__.__name__
        except AttributeError:
            class_str = str(type(obj))
        prefix = ""
    return prefix + class_str