win32file.SetEndOfFile

SetEndOfFile(hFile)

Moves the end-of-file (EOF) position for the specified file to the current position of the file pointer.

Parameters

hFile : PyHANDLE

handle of file whose EOF is to be set