Re: [Tutor] Escaping double quotes

2005-12-08 Thread Tim Johnson
* w chun <[EMAIL PROTECTED]> [051207 22:16]: > > > >>> label = 'this is "quoted"' > > > >>> label.replace('"','\"') > > > 'this is "quoted"' > > > ## This works > > > >>> label.replace('"','\'') > > > "this is 'quoted'" > > > > > > What I should have been using is label.replace('"','\\"') > >

Re: [Tutor] Escaping double quotes

2005-12-07 Thread w chun
> > >>> label = 'this is "quoted"' > > >>> label.replace('"','\"') > > 'this is "quoted"' > > ## This works > > >>> label.replace('"','\'') > > "this is 'quoted'" > > > What I should have been using is label.replace('"','\\"') > :-) Nevermind. hold on a second pardner! :-) what were you t

[Tutor] Escaping double quotes

2005-12-07 Thread Tim Johnson
I must be having a Senior Moment here, but the following baffles me: >>> label = 'this is "quoted"' >>> label.replace('"','\"') 'this is "quoted"' ## This works >>> label.replace('"','\'') "this is 'quoted'" What am I missing here? thanks tim -- Tim Johnson <[EMAIL PROTECTED]> http://www.a

Re: [Tutor] Escaping double quotes

2005-12-07 Thread Tim Johnson
* Tim Johnson <[EMAIL PROTECTED]> [051207 15:56]: > I must be having a Senior Moment here, but the following > baffles me: > >>> label = 'this is "quoted"' > >>> label.replace('"','\"') > 'this is "quoted"' > ## This works > >>> label.replace('"','\'') > "this is 'quoted'" What I should have