On Fri, Apr 29, 2016 at 6:51 AM, Jussi Piitulainen <jussi.piitulai...@helsinki.fi> wrote: > Adam Funk writes: >> On 2016-04-28, Grant Edwards wrote: > >>> Or just do os.access("directory/where/you/want/to/open/a/file",os.W_OK) >> >> That's what I'm doing now, but I prefer to give the user the error >> message early on. > > Then do that early on.
Note that on Windows os.access only checks if a file is read-only. There's a proposed update to check the file security. The patch needs to be updated and needs to be reworked, but it's a low priority. For the most part calling os.access isn't recommended. -- https://mail.python.org/mailman/listinfo/python-list