def inc_xattr(path, key, n=1):
 count = int(get_xattr(path, key))
 count += n
 set_xattr(path, key, str(count))

def inc_xattr ( path , key , n = 1 ) : count = int ( get_xattr ( path , key ) ) count += n set_xattr ( path , key , str ( count ) )
increment the value of an xattr .