예제 #1
0
def accessible2RoleName(pacc2):
    role = pacc2.role()

    if not isinstance(role, int):
        # Maybe one of those Mozilla string roles, just return it.
        return role

    return UNLOCALIZED_ROLE_NAMES.get(role, 'unknown')

    return str(pacc2.role())
예제 #2
0
 def accRoleName2(self):
     role = self.role
     if not isinstance(role, int):
         # Maybe one of those Mozilla string roles, just return it.
         return role
     return UNLOCALIZED_ROLE_NAMES.get(role, 'unknown')
예제 #3
0
 def accRoleName(self, child_id=CHILDID_SELF):
     role = self.accRole(child_id)
     if not isinstance(role, int):
         # Maybe one of those Mozilla string roles, just return it.
         return role
     return UNLOCALIZED_ROLE_NAMES.get(role, 'unknown')
예제 #4
0
파일: accessible.py 프로젝트: eeejay/pyia
 def accRoleName(self, child_id=CHILDID_SELF):
     role = self.accRole(child_id)
     if not isinstance(role, int):
         # Maybe one of those Mozilla string roles, just return it.
         return role
     return UNLOCALIZED_ROLE_NAMES.get(role, 'unknown')