Unpacker.get_buffer(): new method to access the internal buffer of data

This commit is contained in:
Barry Warsaw 1996-12-04 22:04:39 +00:00
parent fd8a393086
commit 75eccc5bcf
1 changed files with 3 additions and 0 deletions

View File

@ -150,6 +150,9 @@ class Unpacker:
def set_position(self, position):
self.__pos = position
def get_buffer(self):
return self.__buf
def done(self):
if self.__pos < len(self.__buf):
raise Error('unextracted data remains')