'Attempt to pass attribute calls to the proxied COM object.
If the attribute is recognised as a property, return its value;
if it is recognised as a method, return a method wrapper which
can then be called with parameters; otherwise pass the lookup
on to the underlying object.'

def __getattr__(self, attribute):

    try:
        if (attribute in self.properties):
            property = self._cached_properties(attribute)
            factory = self.property_map.get(attribute, self.property_map.get(property.type, (lambda x: x)))
            value = factory(property.value)
            if property.type.startswith('ref:'):
                return WMI(moniker=value)
            else:
                return value
        elif (attribute in self.methods):
            return self._cached_methods(attribute)
        else:
            return getattr(self.ole_object, attribute)
    except pywintypes.com_error:
        handle_com_error()
