##// END OF EJS Templates
Backport PR #2757: check for complete pyside presence before trying to import...
Backport PR #2757: check for complete pyside presence before trying to import importing pyside partially and then falling back to pyqt causes a crash in sip (see gh-1431) To avoid it try to locate all modules before the import and should that fail print a warning. debian splits pyside into many small packages so sometimes people end up with incomplete pyside installations.

File last commit:

r2109:93b5c4cd
r9857:b7de0897
Show More
show_refs.py
19 lines | 342 B | text/x-python | PythonLexer
"""Simple script to show reference holding behavior.
This is used by a companion test case.
"""
import gc
class C(object):
def __del__(self):
pass
#print 'deleting object...' # dbg
if __name__ == '__main__':
c = C()
c_refs = gc.get_referrers(c)
ref_ids = map(id,c_refs)
print 'c referrers:',map(type,c_refs)