pybit/py3/block.py
def to_pic(self,
               fn: str='test.pic') -> None:

        """Serialise object to pickle object.

        Removes unserialisable streams first.
        """
        # Can't pickle .mmap objects
        out = self
        out.mmap = []
        for k in out.trans.keys():
            out.trans[k].mmap = []

            for ti in range(len(out.trans[k].txIn)):
                out.trans[k].txIn[ti].mmap = []
            for to in range(len(out.trans[k].txIn)):
                out.trans[k].txOut[to].mmap = []

        p = open(fn, 'wb')
        pickle.dump(out, p)
Serialise object to pickle object.

        Removes unserialisable streams first.
        
Serialise object to pickle object.
Removes unserialisable streams first.
Serialise object to pickle object . Removes unserialisable streams first .
def to_pic(self,
               fn: str='test.pic') -> None:
        out = self
        out.mmap = []
        for k in out.trans.keys():
            out.trans[k].mmap = []
            for ti in range(len(out.trans[k].txIn)):
                out.trans[k].txIn[ti].mmap = []
            for to in range(len(out.trans[k].txIn)):
                out.trans[k].txOut[to].mmap = []
        p = open(fn, 'wb')
        pickle.dump(out, p)
def to_pic ( self , fn : str = 'test.pic' ) -> None : out = self out . mmap = [ ] for k in out . trans . keys ( ) : out . trans [ k ] . mmap = [ ] for ti in range ( len ( out . trans [ k ] . txIn ) ) : out . trans [ k ] . txIn [ ti ] . mmap = [ ] for to in range ( len ( out . trans [ k ] . txIn ) ) : out . trans [ k ] . txOut [ to ] . mmap = [ ] p = open ( fn , 'wb' ) pickle . dump ( out , p )
Serialise object to pickle object.
Serialise object to pickle object .
"""Serialise object to pickle object.

        Removes unserialisable streams first.
        """ # Can't pickle .mmap objects
self
fn
str