BCDataStream can now also take file pointer as argument

This commit is contained in:
Lex Berezhny 2020-02-14 11:34:26 -05:00
parent bad4320ddf
commit 2ee13ce39f

View file

@ -4,8 +4,8 @@ from io import BytesIO
class BCDataStream: class BCDataStream:
def __init__(self, data=None): def __init__(self, data=None, fp=None):
self.data = BytesIO(data) self.data = fp or BytesIO(data)
def reset(self): def reset(self):
self.data.seek(0) self.data.seek(0)