Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'win32': 0.03; 'broken': 0.04; 'subject:file': 0.07; 'alias': 0.09; 'assuming': 0.09; 'check,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'windows': 0.15; 'expecting': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hmm.': 0.16; 'subject:format': 0.16; 'subject:which': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'bit': 0.19; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'either.': 0.24; 'specify': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; '"",': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'file': 0.32; 'checked': 0.32; 'another': 0.32; '(most': 0.33; 'maybe': 0.34; 'subject:the': 0.34; 'something': 0.35; 'received:google.com': 0.35; '14,': 0.36; 'checks': 0.38; 'pm,': 0.38; 'recent': 0.39; 'such': 0.63; 'more': 0.64; 'mar': 0.68; 'unusual': 0.74; '2014,': 0.84; 'directory:': 0.84; 'drive.': 0.84; 'stat': 0.84; 'to:none': 0.92; 'connection,': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=XehGYvLkG7qCocvmII9Mbv+FZmqsg9zpgBmjLIKYEOg=; b=yVxOI7bFqf8c1E9/XF0YnElYyo/K6PAIKH9Zv7JmIc1lavKMIvD+ojSOQdNG3j1p0W MlTsKtOUTXlNQ+vplmdfuXeAxDKAnu0/w5n5OG7ubNpFbfaikL7fKiBYidOxswHUz1s1 kfRkuk+0L1Qda8jVSpAZO2/qtoLgYW7OKLCiVFW6M9xa18yCcc7YL17acQnCjOC8oj01 oloGrlinxkDsWI0de/XV/ZASaDp8qCZoK4IVNVNZN2Sj7scBg4fP5iA24T9fwkfqtXkm 97GXL2YBCZrYLosebxVOWdKKBcHB0nqIMFsvPIeYMztbW/OwLz665/4i7HLVNvWh/r9g XLhA== MIME-Version: 1.0 X-Received: by 10.42.130.194 with SMTP id w2mr23548453ics.12.1418559192775; Sun, 14 Dec 2014 04:13:12 -0800 (PST) In-Reply-To: <548d79cb$0$13008$c3e8da3$5496439d@news.astraweb.com> References: <548d6e92$0$13013$c3e8da3$5496439d@news.astraweb.com> <548d79cb$0$13008$c3e8da3$5496439d@news.astraweb.com> Date: Sun, 14 Dec 2014 23:13:12 +1100 Subject: Re: which is the right file path format in python3.4 ? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1418559201 news.xs4all.nl 2842 [2001:888:2000:d::a6]:44543 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:82500 On Sun, Dec 14, 2014 at 10:51 PM, Steven D'Aprano 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 "", line 1, in 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