python3-xattr has an xattr class that can be used like a dict (and thus call .items() to behave like pyxattr's xattr.get_all()). A wrapper function like this would work: def xattr_get_all(path): try: return xattr.get_all(path) except AttributeError: return xattr.xattr(path).items() -- dwfreed