escaping only double quotes



Hi,

I have a string which is constructed like this:

string = "Butler's 15\" TV"
s = """my string goes here "%s" """ % string

the single string, unfortunately, gets escaped which is something I
want to avoid because I have to load the data into a database using
the json format and I get an "invalid escape error" if the single
quote is escaped.

Is there a way to accomplish this?

Thanks and regards
Francesco

.



Relevant Pages

  • Re: [Announce] Angband 3.0.8 prerelease
    ... amnesia one of the most dangerous effects in entire game. ... I would guess that most casters would be able to mostly avoid such creatures, and melee types wouldn't suffer as much. ... there is memory moss there and because it is not evil you didn't detect it. ... You can't escape with portal and can't blink. ...
    (rec.games.roguelike.angband)
  • Re: OT: Primary Neocon Documents
    ... then we plan to load up and escape to Seattle. ...
    (rec.music.classical.guitar)
  • Re: Prison Break finale (expect spoilers!)
    ... I watched these last week to avoid the inevitable spoilers in the TV guide ... person who watches regularly who is going to think... ... Of course they can escape! ... As lond as Linc, Michael and Sucre ...
    (uk.media.tv.misc)
  • Re: OT - C major fugue
    ... escape from jazz. ... It's not perfect by a long stretch, ... somewhat abruptly to avoid a redundant exposition once I ran out of ...
    (rec.music.makers.guitar.jazz)
  • OT - C major fugue
    ... escape from jazz. ... It's not perfect by a long stretch, ... somewhat abruptly to avoid a redundant exposition once I ran out of ...
    (rec.music.makers.guitar.jazz)