def get_all_objects(start_obj=None):
 output = ['']
 widget_lines = _get_widgets()
 widget_lines = [('    ' + e) for e in widget_lines]
 widget_lines.insert(0, 'Qt widgets - {} objects:'.format(len(widget_lines)))
 output += widget_lines
 if (start_obj is None):
  start_obj = QApplication.instance()
 pyqt_lines = []
 _get_pyqt_objects(pyqt_lines, start_obj)
 pyqt_lines = [('    ' + e) for e in pyqt_lines]
 pyqt_lines.insert(0, 'Qt objects - {} objects:'.format(len(pyqt_lines)))
 output += ['']
 output += pyqt_lines
 output += objreg.dump_objects()
 return '\n'.join(output)

def get_all_objects ( start_obj = None ) : output = [ '' ] widget_lines = _get_widgets ( ) widget_lines = [ ( '    ' + e ) for e in widget_lines ] widget_lines . insert ( 0 , 'Qt widgets - {} objects:' . format ( len ( widget_lines ) ) ) output += widget_lines if ( start_obj is None ) : start_obj = QApplication . instance ( ) pyqt_lines = [ ] _get_pyqt_objects ( pyqt_lines , start_obj ) pyqt_lines = [ ( '    ' + e ) for e in pyqt_lines ] pyqt_lines . insert ( 0 , 'Qt objects - {} objects:' . format ( len ( pyqt_lines ) ) ) output += [ '' ] output += pyqt_lines output += objreg . dump_objects ( ) return '\n' . join ( output )
get all children of an object recursively as a string .