Exemplo n.º 1
0
def makeTermStr(term,byteStart,byteEnd):
    Str = helperFunctions.makeFixedLengthSpace(term,constants.termSize)
    Str = Str+constants.space
    Str = Str+helperFunctions.makeFixedLengthStr(byteStart,constants.byteLen)
    Str = Str+constants.space
    Str = Str+helperFunctions.makeFixedLengthStr(byteEnd,constants.byteLen)+constants.newLine
    return Str
Exemplo n.º 2
0
 def bst(iStart,iEnd,m):
     lenList = int(iEnd-iStart)
     if(lenList != 0):
         middle = (lenList-1)/2
         middle=int(round(middle, 0))
         middle = middle+iStart
         f2.write(m[middle*termSize:(middle*termSize+termSize)])
         bst(iStart,middle,m)
         bst(middle+1,iEnd,m)
     else:
         blankStr = helperFunctions.makeFixedLengthSpace("\n",termSize)
         f2.write(blankStr.encode(constants.encoding))
Exemplo n.º 3
0
def createFile1(fileName):
    with open(fileName, "w") as f:
        f.write(helperFunctions.makeFixedLengthSpace("\n",18))
    f.close()
Exemplo n.º 4
0
def createFile(fileName):
    with open(fileName, "w") as f:
        f.write(helperFunctions.makeFixedLengthSpace("\n",constants.docSize))
    f.close()