#rozmiar pliku wynikowego, zakladamy 20 MB LENGTH = 1024*1024*20 baseFile = open("base.zip","wb") for i in range(LENGTH): baseFile.write(chr(0)) baseFile.close(); #Tutaj powinno byc jakies 256^LENGTH plikow ;-) #Nie uzyjemy wiec indeksu do ich numerowania finish = False i=0 lastFName = "base.zip" while not finish: newName = "base"+str(i)+".zip" i = i +1 outF = open(newName,"wb") inF = open(lastFName,"rb") overflow = True pos = 0 while pos<LENGTH: b = inF.read(1) if type(b)==type("str"): if len(b)==0: b=0 else: b=ord(b) else: b = ord(b) if overflow: overflow = False b=b+1 if b>255: b = 0 overflow = True else: overflow = False outF.write(chr(b)) pos = pos+1 finish = overflow inF.close() outF.close() lastFName = newName