Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-06 Thread random832
On Thu, Sep 5, 2013, at 23:33, Tim Roberts wrote: > random...@fastmail.us wrote: > > > >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. > > This is actually worth repeating, because it's not w

Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-03 Thread random832
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

Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-03 Thread Tim Chase
On 2013-09-03 02:06, Steven D'Aprano wrote: >> So the real bug is with the parser. > > It is likely that nobody noticed this bug in the first place > because the current behaviour doesn't matter for regexes, which is > the primary purpose of raw strings. You can't end a regex with an > unescaped b

Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-02 Thread Steven D'Aprano
On Mon, 02 Sep 2013 13:22:37 -0700, Ethan Furman wrote: > In a raw string, the backslash is buggy (IMNSHO) when it's the last > character. Given the above error, you might think that to get a > single-quote in a string delimited by single-quotes that you would use > r'\'', but no: > > --> r'\''

Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-02 Thread Ethan Furman
On 09/01/2013 07:40 PM, Tim Roberts wrote: Another altrnative is to use "raw" strings, in which backslashes are not interpreted: a = r'E:\Dropbox\jjfsdjjsdklfj\sdfjksdfkjslkj\flute.wav' a.split(r'\') Not quite. --> r'\' File "", line 1 r'\' ^ SyntaxError: EOL while scan

Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-01 Thread materile11
El domingo, 1 de septiembre de 2013 19:34:16 UTC-5, Tim Chase escribió: > On 2013-09-01 17:03, materil...@gmail.com wrote: > > > Hello everybody > > > I'm trying to run this: > > > > > > > > > >>> a = 'E:\Dropbox\jjfsdjjsdklfj\sdfjksdfkjslkj\flute.wav' > > > >>> a.split('\') > > > > >

Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-01 Thread Tim Chase
On 2013-09-02 10:23, Cameron Simpson wrote: > | 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,

Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-01 Thread Tim Chase
On 2013-09-01 17:03, materil...@gmail.com wrote: > Hello everybody > I'm trying to run this: > > > >>> a = 'E:\Dropbox\jjfsdjjsdklfj\sdfjksdfkjslkj\flute.wav' > >>> a.split('\') > > SyntaxError: EOL while scanning string literal > > > I think that the character '\' is the problem, but unfortu

Re: How to split with "\" character, and licence copyleft mirror of ©

2013-09-01 Thread Cameron Simpson
On 01Sep2013 17:03, materil...@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

How to split with "\" character, and licence copyleft mirror of ©

2013-09-01 Thread materile11
Hello everybody I'm trying to run this: >>> 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