Chris Angelico wrote: > On Sun, Dec 14, 2014 at 10:03 PM, Steven D'Aprano > <steve+comp.lang.pyt...@pearwood.info> wrote: >> Run this code and show us what it prints: >> >> import os >> print(os.stat("F:\\") >> print(os.access("F:\\", os.O_RDWR)) > > (With an extra close parenthesis on the first print call)
Thanks. > I'm suspicious here that drive F might not even exist. I would expect > a permissions error to be errno 13, but "invalid argument" seems > really weird. Definitely these checks will be informative. I don't have access to a Windows box to check, otherwise I would do it myself. What happens if you specify a non-existent drive letter? open("Q:\\xxx") # Assuming you don't have a drive Q. -- Steven -- https://mail.python.org/mailman/listinfo/python-list