def __init__(self, data=None, clone=False):
        """
        If data is specified, creates read-only BIO. 
        If clone is True, makes copy of data in the instance member
        If data is
        None, creates writable BIO, contents of which can be retrieved
        by str() or unicode()
        
        """
        if data is None:
            method = libcrypto.BIO_s_mem()
            self.bio = libcrypto.BIO_new(method)
        else:
            if isinstance(data, chartype):
                data = data.encode("utf-8")
                clone = True
            if clone :
                self.data = data
                self.bio = libcrypto.BIO_new_mem_buf(c_char_p(self.data), len(data))
            else:
                self.bio = libcrypto.BIO_new_mem_buf(c_char_p(data), len(data))
def __init__ ( self , data = None , clone = False ) : if data is None : method = libcrypto . BIO_s_mem ( ) self . bio = libcrypto . BIO_new ( method ) else : if isinstance ( data , chartype ) : data = data . encode ( "utf-8" ) clone = True if clone : self . data = data self . bio = libcrypto . BIO_new_mem_buf ( c_char_p ( self . data ) , len ( data ) ) else : self . bio = libcrypto . BIO_new_mem_buf ( c_char_p ( data ) , len ( data ) )
If data is specified, creates read-only BIO. 
        If clone is True, makes copy of data in the instance member
        If data is
        None, creates writable BIO, contents of which can be retrieved
        by str() or unicode()