Added len and getitem to segments

This commit is contained in:
Rob McMullen 2015-10-14 15:02:02 -07:00
parent 88c271a4ae
commit 216f31b173

View File

@ -195,6 +195,12 @@ class ObjSegment(object):
if self.error: if self.error:
s += " " + self.error s += " " + self.error
return s return s
def __len__(self):
return len(self.data)
def __getitem__(self, val):
return self.data[val]
class AtariDosFile(object): class AtariDosFile(object):
"""Parse a binary chunk into segments according to the Atari DOS object """Parse a binary chunk into segments according to the Atari DOS object