Get properties of focus widget
        Returns tuple (widget, properties) where properties is a tuple of
        booleans: (is_console, not_readonly, readwrite_editor)
972983
def get_focus_widget_properties(self):
        """"""
        from spyder.plugins.editor.widgets.editor import TextEditBaseWidget
        from spyder.plugins.ipythonconsole.widgets import ControlWidget
        widget = QApplication.focusWidget()

        textedit_properties = None
        if isinstance(widget, (TextEditBaseWidget, ControlWidget)):
            console = isinstance(widget, ControlWidget)
            not_readonly = not widget.isReadOnly()
            readwrite_editor = not_readonly and not console
            textedit_properties = (console, not_readonly, readwrite_editor)
        return widget, textedit_properties
579256
def get_focus_client(self):
        """"""
        widget = QApplication.focusWidget()
        for client in self.get_clients():
            if widget is client or widget is client.notebookwidget:
                return client
31338
def get_focused_window(self):
        
        window_ret = window_t(0)
        _libxdo.xdo_get_focused_window(self._xdo, ctypes.byref(window_ret))
        return window_ret.value
265610
def get_properties(obj):
    
    if hasattr(obj, 'keys'):
        return obj.keys()
    elif hasattr(obj, '__dict__'):
        return obj.__dict__.keys()

    return []
1016888
def widgetValue( widget ):
    
    for wtype in reversed(_widgetValueTypes):
        if isinstance(widget, wtype[0]):
            try:
                return (wtype[1](widget), True)
            except:
                return (None, False)
    return (None, False)
633858
def get_bool(self, property):
        
        value = self.get(property)
        if isinstance(value, bool):
            return value
        return value.lower() == "true"
38826
def get_property(self):
        """"""

        scope = self

        def fget(self):
            """Call the HasProperties _get method"""
            return self._get(scope.name)

        def fset(self, value):
            """Validate value and call the HasProperties _set method"""
            if value is not undefined:
                value = scope.validate(self, value)
            self._set(scope.name, value)

        def fdel(self):
            """Set value to utils.undefined on delete"""
            self._set(scope.name, undefined)

        return property(fget=fget, fset=fset, fdel=fdel, doc=scope.sphinx())
862228
def get_script_property(value, is_bytes=False):
    """"""

    obj = unidata.ascii_scripts if is_bytes else unidata.unicode_scripts

    if value.startswith('^'):
        negated = value[1:]
        value = '^' + unidata.unicode_alias['script'].get(negated, negated)
    else:
        value = unidata.unicode_alias['script'].get(value, value)

    return obj[value]
1129280
def widget_from_abbrev(cls, abbrev, default=empty):
        """"""
        if isinstance(abbrev, ValueWidget) or isinstance(abbrev, fixed):
            return abbrev

        if isinstance(abbrev, tuple):
            widget = cls.widget_from_tuple(abbrev)
            if default is not empty:
                try:
                    widget.value = default
                except Exception:
                    # ignore failure to set default
                    pass
            return widget

        # Try single value
        widget = cls.widget_from_single_value(abbrev)
        if widget is not None:
            return widget

        # Something iterable (list, dict, generator, ...). Note that str and
        # tuple should be handled before, that is why we check this case last.
        if isinstance(abbrev, Iterable):
            widget = cls.widget_from_iterable(abbrev)
            if default is not empty:
                try:
                    widget.value = default
                except Exception:
                    # ignore failure to set default
                    pass
            return widget

        # No idea...
        return None
1089623
def __getX(self):
        '''
        
        '''

        if DEBUG_COORDS:
            print >>sys.stderr, "getX(%s %s ## %s)" % (self.getClass(), self.getId(), self.getUniqueId())
        x = 0

        if self.useUiAutomator:
            x = self.map['bounds'][0][0]
        else:
            try:
                if GET_VISIBILITY_PROPERTY in self.map and self.map[GET_VISIBILITY_PROPERTY] == 'VISIBLE':
                    _x = int(self.map[self.leftProperty])
                    if DEBUG_COORDS: print >>sys.stderr, "   getX: VISIBLE adding %d" % _x
                    x += _x
            except:
                warnings.warn("View %s has no '%s' property" % (self.getId(), self.leftProperty))

        if DEBUG_COORDS: print >>sys.stderr, "   getX: returning %d" % (x)
        return x
1252290
def GetValue(self):
    '''
    
    '''
    self.AssertInitialization('Positional')
    if str(self._widget.GetValue()) == EMPTY:
      return None
    return self._widget.GetValue()
161219
def get_property(self, index, doctype, name):
        

        return self.indices[index][doctype].properties[name]
914102
async function getWidgetsFromXml(target) {
  const $ = await parseFile(target)
  const widgets = []
  let widget

  $('node').each((i, elem) => {
    const node = $(elem)
    widget = new Widget()
    widget.text = node.attr('text')
    widget.resourceId = node.attr('resource-id')
    widget.className = node.attr('class')
    widget.packageName = node.attr('package')
    widget.contentDesc = node.attr('content-desc')
    widget.checkable = node.attr('checkable')
    widget.checked = node.attr('checked')
    widget.clickable = node.attr('clickable')
    widget.enabled = node.attr('enabled')
    widget.focusable = node.attr('focusable')
    widget.focused = node.attr('focused')
    widget.scrollable = node.attr('scrollable')
    widget.longClickable = node.attr('long-clickable')
    widget.password = node.attr('password')
    widget.selected = node.attr('selected')
    widget.bounds = node.attr('bounds')
    widgets.push(widget)
  })

  return widgets
}
272147
def getActiveProperties(self):
        
        score = self.getScoreProperties()
        return {key: value for (key, value) in score.items()
                if value != 0}
80214
def properties(self, properties):
        """"""
        # We make sure that the dictionary is a NocaseDict object, and that the
        # property values are CIMProperty objects:
        # pylint: disable=attribute-defined-outside-init
        self._properties = NocaseDict()
        if properties:
            try:
                # This is used for iterables:
                iterator = properties.items()
            except AttributeError:
                # This is used for dictionaries:
                iterator = properties
            for item in iterator:
                if isinstance(item, CIMProperty):
                    key = item.name
                    value = item
                elif isinstance(item, tuple):
                    key, value = item
                else:
                    raise TypeError(
                        _format("Input object for properties has invalid item "
                                "in iterable: {0!A}", item))
                self.__setitem__(key, value)
923650
def GetOptions(self):
    
    values = [c.GetValue()
              for c in chain(*self.widgets)
              if c.GetValue() is not None]
    return ' '.join(values)
576287
def get_values (feature, properties):
    
    if feature[0] != '<':
     feature = '<' + feature + '>'
    result = []
    for p in properties:
        if get_grist (p) == feature:
            result.append (replace_grist (p, ''))

    return result