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 StoreInt(theInt, theRange=INTRANGE, theMax=INTMAX):
    if (theInt>theMax or theInt<-theMax):
        raise BufferFileException, "number not in range for format: %s" % theInt
    L = theRange[:]
    for i in theRange:
        thebyte = theInt % 0x100
        L[i] = chr(thebyte)
        theInt = theInt>>8
    return string.join(L, "")
        


src/b/p/BplusPy-1.0/BplusPy/BplusTreeLong.py   BplusPy(Download)
    def makeHeader(this):
        result = [HEADERPREFIX]
        result.append(chr(VERSION))
        result.append(BufferFile.StoreInt(this.NodeSize))
        result.append(BufferFile.StoreInt(this.KeyLength))
        result.append(BufferFile.StoreInt(INVARIANTCULTUREID))

src/b/p/BplusPy-1.0/BplusPy/LinkedFile.py   BplusPy(Download)
    def makeHeader(this):
        #return HEADERPREFIX+chr(VERSION)+BufferFile.StoreInt(
        L = [HEADERPREFIX, chr(VERSION), BufferFile.StoreInt(this.buffersize),
             BufferFile.StoreLong(this.FreeListHead)]
        return string.join(L, "")
        # store header with length info
        firstlength = min(length, this.buffersize-BufferFile.INTSTORAGE)
        buffer = BufferFile.StoreInt(length) + fromString[:firstlength]
        stored = firstlength
        while stored<length:

src/b/p/BplusPy-1.0/BplusPy/xBplusTreeBytes.py   BplusPy(Download)
            thisKey = keys[index]
            thisValue = this.values[index]
            keyPrefix = BufferFile.StoreInt(len(thisKey))
            (keybytes, dummy) = ENCODER(thisKey)
            allbytes.append(keyPrefix)
            allbytes.append(keybytes)
            valuePrefix = BufferFile.StoreInt(len(thisValue))