Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20977 > unrolled thread
| Started by | Tim Chase <python.list@tim.thechases.com> |
|---|---|
| First post | 2012-02-28 06:12 -0600 |
| Last post | 2012-02-28 06:12 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: check if directory is writable in a portable way Tim Chase <python.list@tim.thechases.com> - 2012-02-28 06:12 -0600
| From | Tim Chase <python.list@tim.thechases.com> |
|---|---|
| Date | 2012-02-28 06:12 -0600 |
| Subject | Re: check if directory is writable in a portable way |
| Message-ID | <mailman.224.1330431141.3037.python-list@python.org> |
On 02/28/12 06:01, Andrea Crotti wrote: >>> How should I check if I can create files in a directory? > > But isn't there (or should there be) a windows-related library that > abstracts this horrible things? Yes, there should be. There isn't as far as I know (though that doesn't mean much given my limited experiences in the recesses of Win32 APIs). Additionally, even if you did a LBYL instead, you'd open yourself to a race-condition where the permissions could theoretically change between the time you check and the time you actually try to write there. Granted, that's a slim chance and usually would be a "Doctor, my foot hurts when I do $THIS"/"Well don't do that" situation where the solution is "don't change the permissions while running this program". -tkc
Back to top | Article view | comp.lang.python
csiph-web