Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

        def Retrieve(FromArray, atIndex=0, theRange=INTRANGE, theMax=INTMAX):
    result = 0
    end = atIndex+len(theRange)
    for i in theRange:
        thebyte = ord(FromArray[end-i-1])
        result = result*0x100 + thebyte
    if result>theMax:
        #print "fixing", result
        result = result - 2*theMax
    return int(result)
        


src/b/p/BplusPy-1.0/BplusPy/BplusTreeLong.py   BplusPy(Download)
            raise BplusTreeException, "bad prefix %s should be %s"%(repr(header[:index]),repr(HEADERPREFIX))
        index+=1 # skip version
        this.NodeSize = BufferFile.RetrieveInt(header, index)
        index+=BufferFile.INTSTORAGE
        this.KeyLength = BufferFile.RetrieveInt(header, index)
        index+=BufferFile.INTSTORAGE
        CultureId = BufferFile.RetrieveInt(header, index)

src/b/p/BplusPy-1.0/BplusPy/LinkedFile.py   BplusPy(Download)
            raise LinkedFileException, "bad header prefix"
        remainder = buffer[index+1:]
        this.buffersize = BufferFile.RetrieveInt(remainder, 0)
        this.FreeListHead = BufferFile.RetrieveLong(remainder, BufferFile.INTSTORAGE)
        #print "<br>linkedfile readheader buffersize=", this.buffersize, "freehead=", this.FreeListHead
    def GetChunk(this, HeadBufferNumber):
        (buffer, buffertype, nextBufferNumber) = this.ParseBuffer(HeadBufferNumber)
        if buffertype!=HEAD:
            raise LinkedFileException, "head buffer not marked head "+repr(HeadBufferNumber)
        length = BufferFile.RetrieveInt(buffer)

src/b/p/BplusPy-1.0/BplusPy/xBplusTreeBytes.py   BplusPy(Download)
        bytecount = len(serialization)
        while index<bytecount:
            keylength = BufferFile.RetrieveInt(serialization, index)
            index += BufferFile.INTSTORAGE
            nextindex = index+keylength
            keybytes = serialization[index:nextindex]
            index = nextindex
            (key, dummy) = DECODER(keybytes)
            valuelength = BufferFile.RetrieveInt(serialization, index)