win32file.LockFileEx

LockFileEx(hFile, int, int, int, ol)

Locks a file. Wrapper for LockFileEx win32 API.

Parameters

hFile : PyHANDLE/int

Handle to the file

int : dwFlags

Flags that specify exclusive/shared and blocking/non-blocking mode

int : nbytesLow

low-order part of number of bytes to lock

int : nbytesHigh

high-order part of number of bytes to lock

ol=None : PyOVERLAPPED

An overlapped structure