def __str__(self):
        '''Debug dump string output of NTDSConnection object'''

        text = "%s:\n\tdn=%s" % (self.__class__.__name__, self.dnstr)
        text = text + "\n\tenabled=%s" % self.enabled
        text = text + "\n\tto_be_added=%s" % self.to_be_added
        text = text + "\n\tto_be_deleted=%s" % self.to_be_deleted
        text = text + "\n\tto_be_modified=%s" % self.to_be_modified
        text = text + "\n\toptions=0x%08X" % self.options
        text = text + "\n\tsystem_flags=0x%08X" % self.system_flags
        text = text + "\n\twhenCreated=%d" % self.whenCreated
        text = text + "\n\ttransport_dn=%s" % self.transport_dnstr

        if self.guid is not None:
            text = text + "\n\tguid=%s" % str(self.guid)

        if self.transport_guid is not None:
            text = text + "\n\ttransport_guid=%s" % str(self.transport_guid)

        text = text + "\n\tfrom_dn=%s" % self.from_dnstr

        if self.schedule is not None:
            text = text + "\n\tschedule.size=%s" % self.schedule.size
            text = text + "\n\tschedule.bandwidth=%s" % self.schedule.bandwidth
            text = text + "\n\tschedule.numberOfSchedules=%s" % \
                   self.schedule.numberOfSchedules

            for i, header in enumerate(self.schedule.headerArray):
                text = text + "\n\tschedule.headerArray[%d].type=%d" % \
                       (i, header.type)
                text = text + "\n\tschedule.headerArray[%d].offset=%d" % \
                       (i, header.offset)
                text = text + "\n\tschedule.dataArray[%d].slots[ " % i
                for slot in self.schedule.dataArray[i].slots:
                    text = text + "0x%X " % slot
                text = text + "]"

        return text
dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/kcc_utils.py/NTDSConnection.__str__/original