



IPython 8.4.0 - An enhanced Interactive Python. Type 'copyright', 'credits' or 'license' for more information I will include the full ipython sessions below for completeness. However, there are ways in Windows to set a file to be readable only by the owner, so that seems to be odd. Now, either this is a but in Python, or I am hitting some edge case scenario between Windows and Linux. read permissions for the group and public as well. In Linux, that is the case: In : os.chmod('foo', stat.S_IRUSR)īut on Windows, I am getting In : os.chmod("foo", stat.S_IRUSR) Now, when I run the command os.chmod("foo", stat.S_IRUSR)Īnd check the permissions afterwards, I expect it to end with 0400. I am using the os and stat standard libraries in order to avoid operating system dependency. I am trying to set the permissions of a file to be readable by the user only. I do have a question for the community, from which I will either learn something new about Windows and Linux, or it will result in a Python bug.
