Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'string': 0.09; 'character,': 0.09; 'literal': 0.09; 'os.path': 0.09; 'subject:How': 0.10; 'windows': 0.15; "'\\\\'": 0.16; '(just': 0.16; 'copyleft': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'simpson': 0.16; 'subject:mirror': 0.16; 'syntaxerror:': 0.16; 'wrote:': 0.18; 'app': 0.19; 'file,': 0.19; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'module,': 0.24; 'paul': 0.24; 'cheers,': 0.24; 'distribute': 0.26; 'developing': 0.27; 'header:In-Reply-To:1': 0.27; 'character': 0.29; 'unix': 0.29; "doesn't": 0.30; "i'm": 0.30; 'url:wiki': 0.31; 'app.': 0.31; 'mirror': 0.31; 'url:wikipedia': 0.31; 'url:python': 0.33; "i'd": 0.34; 'subject:with': 0.35; 'but': 0.35; 'really': 0.36; 'received:com.au': 0.36; "i'll": 0.36; 'url:org': 0.36; 'should': 0.36; 'received:211': 0.38; 'url:library': 0.38; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'skip:u 10': 0.60; 'read': 0.60; 'url:3': 0.61; 'content-disposition:inline': 0.62; 'email addr:gmail.com': 0.63; 'show': 0.63; 'name': 0.63; 'of:': 0.68; 'subjectcharset:utf-8': 0.72; 'url:path': 0.84 Date: Mon, 2 Sep 2013 10:23:41 +1000 From: Cameron Simpson To: python-list@python.org Subject: Re: How to split with "\" =?utf-8?Q?charac?= =?utf-8?Q?ter=2C_and_licence_copyleft_mirror_of_=C2=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) References: X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=YYGEuWhf c=1 sm=1 tr=0 a=YuQlxtEQCowy2cfE5kc7TA==:117 a=YuQlxtEQCowy2cfE5kc7TA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=LcaDllckn3IA:10 a=bebit7ZU2Z8A:10 a=jPJDawAOAc8A:10 a=IkcTkHD0fZMA:10 a=vrnE16BAAAAA:8 a=8AHkEIZyAAAA:8 a=M4p5BYLoSWIA:10 a=HDWgMBI4gAMA:10 a=pGLkceISAAAA:8 a=8pif782wAAAA:8 a=zzi8u-qWA3AM3LEfq0QA:9 a=QEXdDO2ut3YA:10 a=nVR0RFA0gN8A:10 a=rLQdu8sF7bkA:10 a=MSl-tDqOz04A:10 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1378081436 news.xs4all.nl 15913 [2001:888:2000:d::a6]:41476 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53442 On 01Sep2013 17:03, materile11@gmail.com wrote: | | >>> a = 'E:\Dropbox\jjfsdjjsdklfj\sdfjksdfkjslkj\flute.wav' | >>> a.split('\') | SyntaxError: EOL while scanning string literal | | | I think that the character '\' is the problem, but unfortunately I'm developing a small app for windows and I need to show only the name of the .wav file, in this case 'flute.wav'. Firstly, you want to say '\\' for a slosh (just as you would say '\n' for a linefeed). However, you really should use the os.path module, in particular os.path.split(). Have a read of: http://docs.python.org/3/library/os.path.html#module-os.path http://docs.python.org/2/library/os.path.html#module-os.path | I also want to know how to mirror a character, in my case this | one ©, because I'll use the Copyleft http://en.wikipedia.org/wiki/Copyleft | to distribute my app. Isn't that a copyright symbol? I'd have a look at the "uncidoedata" module, myself. Cheers, -- Cameron Simpson Just because Unix is a multiuser system doesn't mean I want to share it with anybody! - Paul Tomblin, in rec.aviation.military