I've noticed that when I set the "hidden file" file attribute to true for a text file such as test.json, then when I open the file in python 3.5 it returns the following error:
>>> h = open('test.json','w')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
PermissionError: [Errno 13] Permission denied: 'test.json'
But I'm still able to read the file just fine:
>>> h = open('test.json','r')
>>> for line in h:
... print (line)
...
{"send_key": "Return, Enter", ... }
Any idea why this is? Do I need to do something like run as admin, or clear this attribute, write the file, and set the attribute again?
Some other questions that I found while trying to see if this was asked already didn't help that I could see:
How to remove read-only attrib directory with Python in Windows?
open() is not working for hidden files python
https://sanjaymadnani.wordpress.com/2015/06/06/hide-and-denied-access-folder/
Thanks, Justin