pybit/py3/chain_map.py
def read_next_block(self,
                        n: int=1,
                        tqdm_on=True) -> None:
        """
        Read and return the next block.

        Track cursor position.
        """
        # If verb is low,
        # tqdm is not specifically turned off,
        # and available.
        if tqdm_on:
            # Note if tqdm isn't available, it'll use the placeholder
            # function which does nothing
            tqdm_runner = tqdm
        else:
            tqdm_runner = tqdm_off

        for _ in tqdm_runner(range(n)):
            # Check progress to control printing
            # If verb is >0 tqdm will already have been turned off in Chain
            if BlockMap._index+1 >= self.defer_printing:
                # Allow printing
                verb = self.verb
            else:
                # Keep off for now
                verb = 0

            # Create Block object
            b = BlockMap(self.mmap, self.cursor,
                         f=self.path+self.f,
                         verb=verb,
                         **self.block_kwargs)

            # Read it
            b.read_block()

            # Validate, if on
            if self.validateBlocks:
                b.api_verify()

            self.cursor = b.end
            self.nBlock += 1

            # Save block dat object - unordered at this point
            # self.blocks[self.nBlock] = b
            self.blocks[b.index] = b

            if self.verb == 2:
                print(f"{self.verb*' '*2}Read block {self.nBlock}")

        Read and return the next block.

        Track cursor position.
        
Read and return the next block.
Track cursor position.
Read and return the next block . Track cursor position .
def read_next_block(self,
                        n: int=1,
                        tqdm_on=True) -> None:
        if tqdm_on:
            tqdm_runner = tqdm
        else:
            tqdm_runner = tqdm_off
        for _ in tqdm_runner(range(n)):
            if BlockMap._index+1 >= self.defer_printing:
                verb = self.verb
            else:
                verb = 0
            b = BlockMap(self.mmap, self.cursor,
                         f=self.path+self.f,
                         verb=verb,
                         **self.block_kwargs)
            b.read_block()
            if self.validateBlocks:
                b.api_verify()
            self.cursor = b.end
            self.nBlock += 1
            self.blocks[b.index] = b
            if self.verb == 2:
                print(f"{self.verb*' '*2}Read block {self.nBlock}")
def read_next_block ( self , n : int = 1 , tqdm_on = True ) -> None : if tqdm_on : tqdm_runner = tqdm else : tqdm_runner = tqdm_off for _ in tqdm_runner ( range ( n ) ) : if BlockMap . _index + 1 >= self . defer_printing : verb = self . verb else : verb = 0 b = BlockMap ( self . mmap , self . cursor , f = self . path + self . f , verb = verb , ** self . block_kwargs ) b . read_block ( ) if self . validateBlocks : b . api_verify ( ) self . cursor = b . end self . nBlock += 1 self . blocks [ b . index ] = b if self . verb == 2 : print ( f"{self.verb*' '*2}Read block {self.nBlock}" )
Read and return the next block.
Read and return the next block .
"""
        Read and return the next block.

        Track cursor position.
        """ # If verb is low, # tqdm is not specifically turned off, # and available. # Note if tqdm isn't available, it'll use the placeholder # function which does nothing # Check progress to control printing # If verb is >0 tqdm will already have been turned off in Chain # Allow printing # Keep off for now # Create Block object # Read it # Validate, if on # Save block dat object - unordered at this point # self.blocks[self.nBlock] = b
self
n
int
tqdm_on