To answer indirectly, usually the EAFP (easier to ask forgiveness than permission) approach works better for this kind of thing.
try: f = open('e:\\test\\test', 'a') f.write('abc') f.close() except IOError: print "couldn't write test file, continuing..." On Dec 1, 2007 1:48 AM, Yann Leboulanger <[EMAIL PROTECTED]> wrote: > Hi, > > Under Windows XP os.access has a strange behaviour: > > I create a folder test under e: > > then os.access('e:\\test', os.W_OK) returns True. Everything's ok. > > Now I move My Documents to this e:\test folder > > Then os.access('e:\\test', os.W_OK) returns False !! > > but this works: > f = open('e:\\test\\test', 'a') > f.write('abc') > f.close() > > So why os.access returns False ? > > -- > Yann > -- > http://mail.python.org/mailman/listinfo/python-list > -- -David -- http://mail.python.org/mailman/listinfo/python-list