How to test for isinstance(obj, sip.wrappertype)?

Steve Borho <[email protected]> Sun, 19 Apr 2020 14:52:22 -0500
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
Hello,

How does one test that a Python object is a SIP wrapped object?

Python 3.7.7 (default, Mar 10 2020, 15:43:33) 
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from foo import barstruct
>>> type(barstruct)
<class 'sip.wrappertype'>
>>> import sip
>>> t = barstruct()
>>> isinstance(t, sip.wrappertype)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'sip' has no attribute ‘wrappertype'

Thanks

Steve Borho
_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt