summaryrefslogtreecommitdiffstats
path: root/Lib/xdrlib.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1996-12-04 22:04:39 (GMT)
committerBarry Warsaw <barry@python.org>1996-12-04 22:04:39 (GMT)
commit75eccc5bcf7773921993a64a9d9e7122183e85ab (patch)
tree887318588aee42562e8e5f1ab010514861aba847 /Lib/xdrlib.py
parentfd8a393086fbf43597965d5e55bec158a094a466 (diff)
downloadcpython-75eccc5bcf7773921993a64a9d9e7122183e85ab.zip
cpython-75eccc5bcf7773921993a64a9d9e7122183e85ab.tar.gz
cpython-75eccc5bcf7773921993a64a9d9e7122183e85ab.tar.bz2
Unpacker.get_buffer(): new method to access the internal buffer of data
Diffstat (limited to 'Lib/xdrlib.py')
-rw-r--r--Lib/xdrlib.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py
index 3c18233..fb1e72d 100644
--- a/Lib/xdrlib.py
+++ b/Lib/xdrlib.py
@@ -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')