Wow, this should be so simple, but it\' just not working. I need to inset a \"\\\" into a string (for a Bash command), but escaping just doesn\'t work.
>>&
You are being misled by Python's output. Try:
>>> a = "test\\ing" >>> print(a) test\ing >>> print(repr(a)) 'test\\ing' >>> a 'test\\ing'