def __init__(self, filename=None):
        self.filename = None
        if filename:
            self.load(filename)
def buffer_updated(self, nbytes):
        self.transport.write(self.buffer[:nbytes])