525 @return unicode encoded string |
525 @return unicode encoded string |
526 """ |
526 """ |
527 actual_length = length * 2 |
527 actual_length = length * 2 |
528 data = self.contents[ |
528 data = self.contents[ |
529 self.currentOffset:self.currentOffset + actual_length] |
529 self.currentOffset:self.currentOffset + actual_length] |
530 # unpack not needed?!! data = unpack(">%ds" % (actual_length), data)[0] |
|
531 self.currentOffset += actual_length |
530 self.currentOffset += actual_length |
532 return data.decode('utf_16_be') |
531 return data.decode('utf_16_be') |
533 |
532 |
534 def readDate(self): |
533 def readDate(self): |
535 """ |
534 """ |
608 """ |
607 """ |
609 Special method to generate a representation of the object. |
608 Special method to generate a representation of the object. |
610 |
609 |
611 @return object representation (string) |
610 @return object representation (string) |
612 """ |
611 """ |
613 return "<HashableWrapper: %s>" % [self.value] |
612 return "<HashableWrapper: {0}>".format([self.value]) |
614 |
613 |
615 |
614 |
616 class BoolWrapper(object): |
615 class BoolWrapper(object): |
617 """ |
616 """ |
618 Class wrapping a boolean value. |
617 Class wrapping a boolean value. |
629 """ |
628 """ |
630 Special method to generate a representation of the object. |
629 Special method to generate a representation of the object. |
631 |
630 |
632 @return object representation (string) |
631 @return object representation (string) |
633 """ |
632 """ |
634 return "<BoolWrapper: %s>" % self.value |
633 return "<BoolWrapper: {0}>".format(self.value) |
635 |
634 |
636 |
635 |
637 class PlistWriter(object): |
636 class PlistWriter(object): |
638 """ |
637 """ |
639 Class implementing the plist writer. |
638 Class implementing the plist writer. |