X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/578b389d6ec025acc887d4648df20a366f43882d..609b563c8b9ade4fcde9160f11c7deaf16a9f7b6:/wxPython/wx/py/introspect.py diff --git a/wxPython/wx/py/introspect.py b/wxPython/wx/py/introspect.py index e948296ed8..ebb756999e 100644 --- a/wxPython/wx/py/introspect.py +++ b/wxPython/wx/py/introspect.py @@ -55,6 +55,10 @@ def getAttributeNames(object, includeMagic=1, includeSingle=1, for item in attributes: dict[item] = None attributes = dict.keys() + # new-style swig wrappings can result in non-string attributes + # e.g. ITK http://www.itk.org/ + attributes = [attribute for attribute in attributes \ + if type(attribute) == str] attributes.sort(lambda x, y: cmp(x.upper(), y.upper())) if not includeSingle: attributes = filter(lambda item: item[0]!='_' \