Hi Tim,
Thanks for the reply and suggestions. I followed the patch provided by you in issue 2528, but the code looks very tricky to me. Anyways I wrote my Test.py script & tried only the def test_access_w(self): test case which is defined under class FileTests(unittest.TestCase) by providing my own directory path to check the write permissions on it. I executed my But it failed with the following errors - > python Test.py C:\temp\my_dir test_access_w (__main__.FileTests) ... ERROR ====================================================================== ERROR: test_access_w (__main__.FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Test.py", line 14, in test_access_w f = os.open(dirpath, os.O_CREAT) OSError: [Errno 13] Permission denied: 'C:\\temp\\my_dir' ---------------------------------------------------------------------- Ran 1 test in 0.000s FAILED (errors=1) Basically the os.open() function is failing to open a directory (In this case my_dir). The directory has write permissions for the user. Attached herewith is my Test script. Can you please suggest some simple python code which checks the write permissions of a directory in a straight forward way (Not by using unit tests) Thanks Ayaskant- Bangalore
Test.py
Description: Test.py
-- http://mail.python.org/mailman/listinfo/python-list