pybit/py2/common.py
def read_var(self,
                 pr=False):
        """
        Read next variable length input. These are described in specifiction:
        https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer

        Retuns output and number of steps taken by cursor
        """

        # Get the next byte
        by = self.read_next(1)
        o = ord(by)
        if pr:
            print by

        if o < 253:
            # Return as is
            # by is already int here
            out = by
        elif o == 253:  # 0xfd
            # Read next 2 bytes
            # Reverse endedness
            # Convert to int in base 16
            out = self.read_next(2)
        elif o == 254:  # 0xfe
            # Read next 4 bytes, convert as above
            out = self.read_next(4)
        elif o == 255:  # 0xff
            # Read next 8 bytes, convert as above
            out = self.read_next(8)

        if pr:
            print int(out[::-1].encode("hex"), 16)

        return out

        Read next variable length input. These are described in specifiction:
        https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer

        Retuns output and number of steps taken by cursor
        
Read next variable length input.

Retuns output and number of steps taken by cursor
Read next variable length input . Retuns output and number of steps taken by cursor
def read_var(self,
                 pr=False):
        by = self.read_next(1)
        o = ord(by)
        if pr:
            print by
        if o < 253:
            out = by
        elif o == 253:  
            out = self.read_next(2)
        elif o == 254:  
            out = self.read_next(4)
        elif o == 255:  
            out = self.read_next(8)
        if pr:
            print int(out[::-1].encode("hex"), 16)
        return out
def read_var ( self , pr = False ) : by = self . read_next ( 1 ) o = ord ( by ) if pr : print by if o < 253 : out = by elif o == 253 : out = self . read_next ( 2 ) elif o == 254 : out = self . read_next ( 4 ) elif o == 255 : out = self . read_next ( 8 ) if pr : print int ( out [ : : - 1 ] . encode ( "hex" ) , 16 ) return out
Read next variable length input.
Read next variable length input .
"""
        Read next variable length input. These are described in specifiction:
        https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer

        Retuns output and number of steps taken by cursor
        """ # Get the next byte # Return as is # by is already int here # 0xfd # Read next 2 bytes # Reverse endedness # Convert to int in base 16 # 0xfe # Read next 4 bytes, convert as above # 0xff # Read next 8 bytes, convert as above
self
pr