def pop(self, bytes):
        """
        Like :class:`head()`, but also removes the head from the buffer.

        :type  bytes: int
        :param bytes: The number of bytes to return and remove.
        """
        self.io.seek(0)
        head = self.io.read(bytes)
        tail = self.io.read()
        self.io.seek(0)
        self.io.write(tail)
        self.io.truncate()
        return head
def pop ( self , bytes ) : self . io . seek ( 0 ) head = self . io . read ( bytes ) tail = self . io . read ( ) self . io . seek ( 0 ) self . io . write ( tail ) self . io . truncate ( ) return head
Like :class:`head()`, but also removes the head from the buffer.

        :type  bytes: int
        :param bytes: The number of bytes to return and remove.