Yann Leboulanger wrote:
> Ok thanks for all those information, I'll remove the call to os.access() 
> on folders for windows in my application.
> 

FWIW, I think it's worth bearing in mind what was said
earlier in this thread: it's easier to ask forgiveness
than permission. Technically, even if os.access did
exactly what you expected, there's nothing to stop the
access changing between os.access (...) and open (...).
Unless you have reason not to, it's considered perfectly
good practice in Python to try/except the open ():

<code>
try:
   f = open ("e:/test/test.tst", "w")
except (IOError, WindowsError):
   print "Something went wrong"
else:
   "Do whatever"
</code>

TJG
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to