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 ?

References <mailman.16941.1418547951.18130.python-list@python.org> <548d6e92$0$13013$c3e8da3$5496439d@news.astraweb.com>
Date 2014-12-14 22:09 +1100
Subject Re: which is the right file path format in python3.4 ?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.16942.1418555375.18130.python-list@python.org> (permalink)

Show all headers | 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