Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: 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; 'python,': 0.02; 'enabling': 0.05; 'defaults': 0.07; 'ignored': 0.07; 'parser': 0.07; 'patterns.': 0.07; 'literal': 0.09; 'received:internal': 0.09; 'trailing': 0.09; 'variable,': 0.09; 'subject:How': 0.10; 'changes': 0.15; 'windows': 0.15; 'backslash': 0.16; 'command,': 0.16; 'expands': 0.16; 'literals.': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'pathname': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'separator,': 0.16; 'slash': 0.16; 'subject:mirror': 0.16; 'to:addr:python.list': 0.16; 'to:addr:tim.thechases.com': 0.16; 'to:name:tim chase': 0.16; 'wrote:': 0.18; "python's": 0.19; 'putting': 0.22; 'affects': 0.24; 'purposes': 0.26; 'primary': 0.26; 'certain': 0.27; 'header :In-Reply-To:1': 0.27; 'to:2**1': 0.27; '(this': 0.29; 'tim': 0.29; 'expansion': 0.30; '(which': 0.31; 'chase': 0.31; 'sep': 0.31; 'file': 0.32; 'option': 0.32; 'running': 0.33; 'not.': 0.33; 'raw': 0.33; 'maybe': 0.34; "i'd": 0.34; 'could': 0.34; 'received:66': 0.35; 'subject:with': 0.35; 'should': 0.36; 'two': 0.37; 'received:10': 0.37; 'starting': 0.37; 'problems': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'fact': 0.38; 'quote': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'remove': 0.60; 'from:no real name:2**0': 0.61; 'free': 0.61; "you're": 0.61; 'header:Message-Id:1': 0.63; 'day.': 0.63; 'forward': 0.65; 'close': 0.67; 'sound': 0.68; 'subjectcharset:utf-8': 0.72; 'end.': 0.84; '2013,': 0.91 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= message-id:from:to:mime-version:content-transfer-encoding :content-type:in-reply-to:references:subject:date; s=mesmtp; bh= LaAz9E2xvJ3aTzfdbXWSud42oos=; b=VbuKdEeeWQv/gpKHmgzN72gxBvrkKMWR MHBSgwEfB76Y/+ZQAsGeiVyCbCmNN9ebca28MJ4rPwLtlQtTWhNfTOATWpLbb9R5 jFgXudPCAZ5c+CHfgtlhVUlr09emQle9W8ne1jYExqXzLOCFDsRJL0hd0YlVEJqf CHA6nXaVnW0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=LaAz9E2xvJ3aTzfdbXWSud42oos=; b=MDu EfDqd9E4r7c3DqGvJhCXAXjsImnMKf8Y3bCX3684Z7vej/gtZHOCggLuSG6B8/RW j9kNeIFaUmPNn1FGMVvrr/yGWbyXKZdRn8ge1VyOzkNdvzSIcKccASgtpXfaf4LX bKZg1NoyoOTsIDxvYX3aMVw1+wnwLfk/fPBStLvY= X-Sasl-Enc: zQ3itVkga6ncl9qL+nuk6BBxniHNniJZ2ezwRTz5Eadd 1378233119 From: random832@fastmail.us To: Tim Chase , python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-ed2f0e98 In-Reply-To: <20130903053159.5221f886@bigbox.christie.dr> References: <5225443e$0$6599$c3e8da3$5496439d@news.astraweb.com> <20130903053159.5221f886@bigbox.christie.dr> Subject: =?UTF-8?Q?Re=3A=20How=20to=20split=20w?= =?UTF-8?Q?ith=20=22\=22=20character=2C?= =?UTF-8?Q?=20and=20licence=20copyl?= =?UTF-8?Q?eft=20mirror=20of=20=C2=A9?= Date: Tue, 03 Sep 2013 14:31:59 -0400 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1378233513 news.xs4all.nl 15958 [2001:888:2000:d::a6]:53531 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53576 On Tue, Sep 3, 2013, at 6:31, Tim Chase wrote: > I'd contend that the two primary purposes of raw strings (this is > starting to sound like a Spanish Inquisition sketch) are regexes and > DOS/Win32 file path literals. And I hit this trailing-backslash case > all the time, as Vim's path-completion defaults to putting the > trailing backslash at the end. So I might be entering a literal like > > r"c:\win > > and hit which expands to > > r"c:\Windows\ > > for which I then need to both remove the backslash and close the > quote. If Python's parser just blithely ignored terminal > backslashes, I could just close the quote and get on with my day. Of course, in 99% of situations where you can use a windows pathname in Python, you are free to use it with a forward slash instead of a backslash. The fact that you're using vim's file completion, which automatically normalizes the path separator, is why you're running into this issue when other people may not. Maybe enabling the 'shellslash' option (which changes it to use forward slash) will help you, though you should be aware this also affects the expansion of the % variable, even in the :! command, which can cause problems with certain usage patterns.