The fcntl module is just used for locking the pinning file, so assuming you don't try multiple access, this can be an acceptable workaround. Place this module in your sys.path
, and it should just work as the official fcntl module.
Try using this module (source) for development/testing purposes only in windows.
def fcntl(fd, op, arg=0):
return 0
def ioctl(fd, op, arg=0, mutable_flag=True):
if mutable_flag:
return 0
else:
return ""
def flock(fd, op):
return
def lockf(fd, operation, length=0, start=0, whence=0):
return
Of course, then you need to place the fcntl.py
module in your site-packages
directory for the Python interpreter that you want to use. For example, %LOCALAPPDATA%\Programs\Python\Python310\lib\site-packages\fcntl\
. This is where my site-packages
live. Check Tutorialspoint to find where yours is located.