Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38206
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <joel.goldstick@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'win32': 0.03; 'syntax': 0.03; '(python': 0.05; 'inserts': 0.07; 'puts': 0.07; 'subject:Question': 0.07; 'trailing': 0.07; 'python': 0.09; 'backslash': 0.09; 'highlighting': 0.09; 'cc:addr:python-list': 0.10; "'\\\\'": 0.16; '-tkc': 0.16; 'interprets': 0.16; 'mistake.': 0.16; 'syntaxerror:': 0.16; '\xc2\xa0i': 0.16; 'string': 0.17; 'wrote:': 0.17; '>>>': 0.18; 'feb': 0.19; 'email addr:gmail.com>': 0.20; 'import': 0.21; '>>>': 0.22; 'cc:2**0': 0.23; '>': 0.23; '(i.e.,': 0.23; 'task': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; '+0100': 0.27; 'message-id:@mail.gmail.com': 0.27; 'correct': 0.28; 'all.': 0.28; 'url:mailman': 0.29; 'skip:& 10': 0.29; "i'm": 0.29; 'knows': 0.30; 'stuff': 0.30; 'url:python': 0.32; 'url:listinfo': 0.32; 'docs': 0.33; 'anyone': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'url:org': 0.36; 'correctly': 0.37; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'easier': 0.38; 'sure': 0.38; 'shows': 0.38; 'notice': 0.39; 'url:mail': 0.40; 'your': 0.60; 'remove': 0.61; 'ever': 0.63; 'laptop': 0.66; '2013': 0.84; 'beside': 0.84; 'ok?': 0.84; 'joel': 0.91; 'subject:Best': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Rne1NTErMLOA+yHY3UsRyVzO79mmoGzeVKgCZfMJ0Xk=; b=iCcF6/UNd7VEV5HgF3oBBKuoQqtx2jEaAg9Uve1DIGqUNtafHDTr3/S/y/KM61j5PO h8RFZzR5hINZMiB5tRSOxzKg+0+Q0p9trXukL1+3eWUqrjJg9shHRfrgN6j6bkDyKswk hh9V2Db+Wk9k2KR0rgci9nOmZXw6+TS0i4CU35AldgDo2CQ/pEEQ11M0ild6QW1n0cSh e1WXJUNG4U8kTKC4jcK3qtcy7/m6hBCaiCJiSOCRYz/zJYMNlVru5axP2ZqmiyjAkMfV MWMa94WAdeX+KbuS0c77mEAbao71LK7quNcm+Mwp/2duQnXOP4RD+Ph61J8m7MJyfP5i aLPw== |
| MIME-Version | 1.0 |
| X-Received | by 10.52.155.205 with SMTP id vy13mr25202845vdb.119.1360083205021; Tue, 05 Feb 2013 08:53:25 -0800 (PST) |
| In-Reply-To | <b04a6aad-1730-403d-88d4-716be2033296@googlegroups.com> |
| References | <5110F277.9020205@davea.name> <1931346778.15606854.1360074752203.JavaMail.root@sequans.com> <mailman.1370.1360081284.2939.python-list@python.org> <b04a6aad-1730-403d-88d4-716be2033296@googlegroups.com> |
| Date | Tue, 5 Feb 2013 11:53:24 -0500 |
| Subject | Re: Best Practice Question |
| From | Joel Goldstick <joel.goldstick@gmail.com> |
| To | Anthony Correia <akcorreia@gmail.com> |
| Content-Type | multipart/alternative; boundary=bcaec53aecce4cdfcb04d4fd0ca6 |
| Cc | "python-list@python.org" <python-list@python.org> |
| 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 | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1373.1360083208.2939.python-list@python.org> (permalink) |
| Lines | 121 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1360083208 news.xs4all.nl 6930 [2001:888:2000:d::a6]:37026 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:38206 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Tue, Feb 5, 2013 at 11:40 AM, Anthony Correia <akcorreia@gmail.com>wrote:
> On Tuesday, February 5, 2013 10:17:54 AM UTC-5, pytho...@tim.thechases.comwrote:
> > On Tue, 5 Feb 2013 15:32:32 +0100 (CET), Jean-Michel Pichavant wrote:
> >
> > > By the way, did someone ever notice that r'\' fails ? I'm sure
> >
> > > there's a reason for that... (python 2.5) Anyone knows ?
> >
> > >
> >
> > > r'\'
> >
> > > SyntaxError: EOL while scanning single-quoted string
> >
> >
> >
> > I hit this all the time with Vim's path-completion (":help
> >
> > i_CTRL-X_CTRL-F") on Win32 which puts a trailing "\" on
> >
> > directory-names. I just need to remember to remove it, a task made
> >
> > easier because the syntax highlighting correctly shows how Python
> >
> > interprets it (i.e., the string is still continued).
> >
> >
> >
> > -tkc
>
> Sorry about that I hit the touchpad on my laptop by mistake. Beside the
> using single '\' vs a double '\\' does that look ok?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
according to the docs for os.path.join, you don't need the backslash stuff
at all. Python knows the correct separator for your os and inserts it
accordingling:
I'm on linux:
>>> import os
>>> p = os.path.join('bob', 'bill')
>>> p
'bob/bill'
>>>
--
Joel Goldstick
http://joelgoldstick.com
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Best Practice Question python.list@tim.thechases.com - 2013-02-05 09:17 -0600
Re: Best Practice Question Anthony Correia <akcorreia@gmail.com> - 2013-02-05 08:40 -0800
Re: Best Practice Question Joel Goldstick <joel.goldstick@gmail.com> - 2013-02-05 11:53 -0500
Re: Best Practice Question Dave Angel <d@davea.name> - 2013-02-05 13:10 -0500
Re: Best Practice Question Anthony Correia <akcorreia@gmail.com> - 2013-02-05 08:40 -0800
csiph-web