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


Groups > comp.lang.python > #82495

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!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <elearn2014@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.068
X-Spam-Evidence '*H*': 0.86; '*S*': 0.00; 'subject:file': 0.07; 'argument:': 0.16; 'subject:format': 0.16; 'subject:which': 0.16; 'subject: ?': 0.16; '>>>': 0.22; 'header:User-Agent:1': 0.23; "skip:' 10": 0.31; '"",': 0.31; 'file': 0.32; '(most': 0.33; 'subject:the': 0.34; 'received:google.com': 0.35; 'disk': 0.36; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'subject: ': 0.61; 'new': 0.61; 'invalid': 0.68
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=UIIM7HZdzhKig2DG+TLp6Kejk0jsofip8oFGl9vUQgI=; b=Eq5tunquFetpMZ6zXbmaNd6KeaNh60oMzarCQmvK4nf493GLdqot4KBzsEDR7IdVUu NjVuZz5VWI70nPsHfZpOK51c1ahMTIVtHApHHRIF0hcNG/eg7uTeR0/ftLcyifovpGbB LCA+KD5WQUK7V3SIUrL0iYr6XXozfV9YMCohlolOb6kJKcJ5au2PK2h5MDZO7zLqRPM+ mASu6r2mEPHd2qq8Ol80ed/1ZIbfy2hcgNwWpLlrcGhYJIvglnuQLtibcEVPFuiweHZm mDhd36UlYh1KMcuLkJ6LehzOYwitcH1bV7PmJ0P3KUAM5oD4CS0QwIVq7OPBb0EJyIYW dwEg==
X-Received by 10.68.221.106 with SMTP id qd10mr40929287pbc.98.1418547942396; Sun, 14 Dec 2014 01:05:42 -0800 (PST)
Date Sun, 14 Dec 2014 17:05:29 +0800
From sir <elearn2014@gmail.com>
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version 1.0
To python-list@python.org
Subject which is the right file path format in python3.4 ?
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
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.16941.1418547951.18130.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1418547951 news.xs4all.nl 2936 [2001:888:2000:d::a6]:53782
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3756
X-Received-Body-CRC 416881120
Xref csiph.com comp.lang.python:82495

Show key headers only | View raw


My system is :win7+python3.4  .

I want to write a new file "named names.txt"  in disk f:

  >>> ff=open(r"F:\names.txt","w")
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument: 'F:\\names.txt'
 >>> ff=open(r"F:/names.txt","w")
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument: 'F:/names.txt'
 >>> ff=open(r"F://names.txt","w")
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument: 'F://names.txt'
 >>> ff=open(r"f://names.txt","w")
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument: 'f://names.txt'
 >>> ff=open(r"f:/names.txt","w")
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument: 'f:/names.txt'

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

Back to comp.lang.python | Previous | Next — 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