def get_owner(obj_name):
 security_descriptor = win32security.GetFileSecurity(obj_name, win32security.OWNER_SECURITY_INFORMATION)
 owner_sid = security_descriptor.GetSecurityDescriptorOwner()
 return get_name(win32security.ConvertSidToStringSid(owner_sid))

def get_owner ( obj_name ) : security_descriptor = win32security . GetFileSecurity ( obj_name , win32security . OWNER_SECURITY_INFORMATION ) owner_sid = security_descriptor . GetSecurityDescriptorOwner ( ) return get_name ( win32security . ConvertSidToStringSid ( owner_sid ) )
gets the owner of the passed object args: obj_name : the path for which to obtain owner information returns: str: the owner usage: .