def streamify(self, state, frame):
        """Prepare frame for output as a byte-stuffed stream."""

        # Split the frame apart for stuffing...
        pieces = frame.split(self.prefix)

        return '%s%s%s%s%s' % (self.prefix, self.begin,
                               (self.prefix + self.nop).join(pieces),
                               self.prefix, self.end)
Prepare frame for output as a byte-stuffed stream.