Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82498

Re: which is the right file path format in python3.4 ?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:file': 0.07; 'permissions': 0.09; 'cc:addr:python-list': 0.11; 'call)': 0.16; 'errno': 0.16; 'exist.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'informative.': 0.16; 'subject:format': 0.16; 'subject:which': 0.16; 'weird.': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'import': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'error': 0.23; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; '13,': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'run': 0.32; 'subject:the': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; '14,': 0.36; 'checks': 0.38; 'pm,': 0.38; 'expect': 0.39; 'skip:p 20': 0.39; 'even': 0.60; 'first': 0.61; 'show': 0.63; 'here': 0.66; 'close': 0.67; 'suspicious': 0.91; 'to:none': 0.92
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=IYaQIoyfi0knT8OV8ZnM8hbHLgGArVged2qogbmD2dw=; b=vskJRpbZvKAkiXAWKLeJWG8ZNSL7OlaZZhsWJDeiugIoRhjX2zjH3LCpEqmFqW/4we 6B+aF6Q3BGasTgK4/kXQH2K696lJ/yDv8I4F6FSSedtLFJnAW+jmaqF0cLiW6VVwSTC2 jRQcpOfVVVF0SXHJ7SNRiBSK/hXeL0DY4AjkJjzJtgh5X01ApoQ4huZSNGL1m8pPeV4Y AbmzLL26CbRwhPkB+2URrFGH77M28T4mOVkjh7Ad9LucntUcx9vJCLuzCktVJLvRd60W v1GnVf/bjFQ4DYO+tTgj01Pft2/7lKbbBcplud5McGfjDIuTB470UKJnaWcAOVEMG/YO 7A8w==
MIME-Version 1.0
X-Received by 10.50.171.168 with SMTP id av8mr13174188igc.2.1418555372834; Sun, 14 Dec 2014 03:09:32 -0800 (PST)
In-Reply-To <548d6e92$0$13013$c3e8da3$5496439d@news.astraweb.com>
References <mailman.16941.1418547951.18130.python-list@python.org> <548d6e92$0$13013$c3e8da3$5496439d@news.astraweb.com>
Date Sun, 14 Dec 2014 22:09:32 +1100
Subject Re: which is the right file path format in python3.4 ?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16942.1418555375.18130.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1418555375 news.xs4all.nl 2978 [2001:888:2000:d::a6]:38552
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3719
X-Received-Body-CRC 1886450562
Xref csiph.com comp.lang.python:82498

Show key headers only | View raw


On Sun, Dec 14, 2014 at 10:03 PM, Steven D'Aprano
<steve+comp.lang.python@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)

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.

ChrisA

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

which is the right  file path format in python3.4 ? sir <elearn2014@gmail.com> - 2014-12-14 17:05 +0800
  Re: which is the right  file path format in python3.4 ? Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2014-12-14 10:52 +0100
  Re: which is the right  file path format in python3.4 ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-12-14 22:03 +1100
    Re: which is the right file path format in python3.4 ? Chris Angelico <rosuav@gmail.com> - 2014-12-14 22:09 +1100
      Re: which is the right file path format in python3.4 ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-12-14 22:51 +1100
        Re: which is the right file path format in python3.4 ? Chris Angelico <rosuav@gmail.com> - 2014-12-14 23:13 +1100

csiph-web