<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 5, 2013 at 11:40 AM, Anthony Correia <span dir="ltr"><<a href="mailto:akcorreia@gmail.com" target="_blank">akcorreia@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">On Tuesday, February 5, 2013 10:17:54 AM UTC-5, <a href="mailto:pytho...@tim.thechases.com">pytho...@tim.thechases.com</a> wrote:<br>

> On Tue, 5 Feb 2013 15:32:32 +0100 (CET), Jean-Michel Pichavant wrote:<br>
><br>
</div><div class="im">> > By the way, did someone ever notice that r'\' fails ? I'm sure<br>
><br>
> > there's a reason for that... (python 2.5) Anyone knows ?<br>
><br>
> ><br>
><br>
> > r'\'<br>
><br>
> > SyntaxError: EOL while scanning single-quoted string<br>
><br>
><br>
><br>
</div><div class="im">> I hit this all the time with Vim's path-completion (":help<br>
><br>
> i_CTRL-X_CTRL-F") on Win32 which puts a trailing "\" on<br>
><br>
> directory-names.  I just need to remember to remove it, a task made<br>
><br>
> easier because the syntax highlighting correctly shows how Python<br>
><br>
> interprets it (i.e., the string is still continued).<br>
><br>
><br>
><br>
> -tkc<br>
<br>
</div>Sorry about that I hit the touchpad on my laptop by mistake.  Beside the using  single '\' vs a double '\\' does that look ok?<br>
<span class=""><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div><div class="gmail_extra">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:<br>
I'm on linux:<br><br>>>> import os<br>>>> p = os.path.join('bob', 'bill')<br>>>> p<br>'bob/bill'<br>>>> <br><br clear="all"></div><div class="gmail_extra"><br>
-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br></div>
</div></div>