MCPcopy Create free account
hub / github.com/ActiveState/code / one

Function one

recipes/Python/578205_Zero_Batch_Programs/recipe-578205.py:89–100  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

87import zero
88
89def one(path):
90 size = zero.os.path.getsize(path)
91 if size:
92 data = open(path, 'wb')
93 todo = size
94 if todo >= 2 ** 20:
95 buff = '\xFF' * 2 ** 20
96 while todo >= 2 ** 20:
97 data.write(buff)
98 todo = size - data.tell()
99 data.write('\xFF' * todo)
100 data.close()
101
102if __name__ == '__main__':
103 zero.main(one)

Callers

nothing calls this directly

Calls 4

openFunction · 0.50
writeMethod · 0.45
tellMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected