Shidai Liu wrote:
I havent got access to a windows box unfortunately at the moment. And I have no idea about permissions on windows boxes anyway :)
I found out in the following situation, it fails to work.
Say, 'somefile.csv' is opened by EXCEL,
Trueos.access('somefile.csv', os.W_OK)
file('somefile.csv', 'w')
IOError: [Errno 13] Permission denied: 'somefile.csv'
By the way, using os.stat & stat as suggested by Alan doesn't work either. Any idea how solve it?
However, did you already have the .csv file open in Excel or some other app ? Or is is password protected maybe ?
Sorry not much help.
Nick . _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor