helper method to register str and repr methods for structures

def __registerStructStr():
    """helper method to register str and repr methods for structures"""
    structs = (LockerInfo, DevCommandInfo, AttributeDimension, CommandInfo,
               DeviceInfo, DeviceAttributeConfig, AttributeInfo, AttributeAlarmInfo,
               ChangeEventInfo, PeriodicEventInfo, ArchiveEventInfo,
               AttributeEventInfo, AttributeInfoEx, PipeInfo,
               DeviceAttribute, DeviceAttributeHistory, DeviceData, DeviceDataHistory,
               DevicePipe, DbDatum, DbDevInfo, DbDevImportInfo, DbDevExportInfo,
               DbServerInfo, GroupReply, GroupAttrReply, GroupCmdReply,
               DevError, EventData, AttrConfEventData, DataReadyEventData,
               AttributeConfig, AttributeConfig_2, AttributeConfig_3,
               AttributeConfig_5,
               ChangeEventProp, PeriodicEventProp, ArchiveEventProp,
               AttributeAlarm, EventProperties)

    for struct in structs:
        struct.__str__ = __str__Struct
        struct.__repr__ = __repr__Struct

    # special case for TimeVal: it already has a str representation itself
    TimeVal.__repr__ = __repr__Struct

    # special case for DevFailed: we want a better pretty print
    # also, because it is an Exception it has the message attribute which
    # generates a Deprecation warning in python 2.6
    DevFailed.__str__ = __str__DevFailed
    DevFailed.__repr__ = __repr__DevFailed

    DevError.__str__ = __str__DevError