i am trying to lock a certain text file with PERMISSION, and that the program and only the program could access the file & reading & changing it. even when the program is not wokring!
I've tried doing this with lockfile method but it locks the file while you are writing to it, and it is not what i need, also tried to change permission with os.chmod but i dont fully understand how it works even tho i looked up. I've tried something like that
os.chmod(stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)