On Sun, Dec 14, 2014 at 10:51 PM, Steven D'Aprano
<steve+comp.lang.pyt...@pearwood.info> wrote:
> 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.

Hmm. I just grabbed one (granted, it's XP not W7) and checked it, and
it's not what I was expecting either.

Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:24:06) [MSC v.1600
32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> open("Q:\\xxx")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'Q:\\xxx'

Still, it might be something unusual about the OP's drive. Maybe a
network drive with a broken connection, or a mounted CD, or an alias
for another directory... who knows. Hopefully the stat and access
checks will reveal something.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to